24 bit spi transfer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
289件の閲覧回数
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 件の賞賛
返信
1 解決策
247件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
248件の閲覧回数
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 件の賞賛
返信
224件の閲覧回数
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 件の賞賛
返信