24 bit spi transfer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

24 bit spi transfer

Jump to solution
287 Views
Transidico
Contributor III

Good morning,
I need to perform a 24-bit SPI transfer with mcxc242, with the clock in continuous mode.

How can I do this?

I tried making 3 packets of 8 in this way:

Transidico_0-1758205928414.png

and 2 packets of 16 in this way:

Transidico_1-1758205946745.png

As you can see from the images, using SPI_MasterTransferBlocking() sends me the clock for each data packet, but I need the clock to be continuous for 24 consecutive bits.

How can I get the clock to be continuous as in the image below?

Transidico_2-1758206154246.png

Many thanks for any replies.

Best regards

0 Kudos
Reply
1 Solution
245 Views
Pablo_Ramos
NXP Employee
NXP Employee

Hi @Transidico,

You can use the SDK example spi_interrupt as a reference.

In this example, a transmission of 64 data bytes is performed consecutively, as shown in the following frame.

Pablo_Ramos_0-1758560406964.png

Best Regards,
Pablo

View solution in original post

0 Kudos
Reply
2 Replies
246 Views
Pablo_Ramos
NXP Employee
NXP Employee

Hi @Transidico,

You can use the SDK example spi_interrupt as a reference.

In this example, a transmission of 64 data bytes is performed consecutively, as shown in the following frame.

Pablo_Ramos_0-1758560406964.png

Best Regards,
Pablo

0 Kudos
Reply
222 Views
Transidico
Contributor III

Dear Pablo,

thanks a lot for your message, I have resolved it by using SPI in DMA mode, without interrupt.

Thank you very much.

Best regards.

0 Kudos
Reply