SPI master TX data incorrect.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Sccccc
Level 1
Level 1
5 sign-ins First reply posted First like given

Hi,

I am using TC387 kit testing the spi funciton, I set the autoCS = 1 and OEN = 0 to make the CS controled by software, the code is below:

Sccccc_0-1674962916489.png

My purpose is keep CS low when transporting data, but when I do this, the TX data will be incorrect compare with my source data, my source data is:

Sccccc_1-1674963068046.png

CS jump every byte could get the right TX data:

Sccccc_3-1674963185323.pngSccccc_2-1674963154360.png

 

But when keep the CS low,  the TX data will incorrect:

Sccccc_4-1674963239014.pngSccccc_5-1674963291278.png

Have I missed some setup for the SPI?

Thank you!

0 Likes
1 Solution
Jeremy_Z
Moderator
Moderator
Moderator
1000 replies posted 250 sign-ins 100 likes received

Hi @Sccccc ,

Thank you for your interest in Infineon Semiconductor products and for the opportunity to serve you.
Comparing the above figures, the pink signals are identical actually, assume the MOSI pin sends the 0x00 consecutively, the signal will be similar to the CS signal instead of the below figure shows.

Jeremy_Zhou_0-1674973553433.png

BR,

Jeremy

View solution in original post

4 Replies
Jeremy_Z
Moderator
Moderator
Moderator
1000 replies posted 250 sign-ins 100 likes received

Hi @Sccccc ,

Thank you for your interest in Infineon Semiconductor products and for the opportunity to serve you.
Comparing the above figures, the pink signals are identical actually, assume the MOSI pin sends the 0x00 consecutively, the signal will be similar to the CS signal instead of the below figure shows.

Jeremy_Zhou_0-1674973553433.png

BR,

Jeremy

Hi Jeremy,

Thank you for your reply.

if I keep the chip select is controlled by the hardware module, how can I set to make chip select keep low before whole data send out?

Thank you!

Best wishes

0 Likes
Jeremy_Z
Moderator
Moderator
Moderator
1000 replies posted 250 sign-ins 100 likes received

Hi @Sccccc ,

Thanks for your reply.

To provide the fastest support, please go to refer to this demo.

BR,

Jeremy

0 Likes

Hi @Jeremy_Z :

Thank you for your reply, I am using this demo to develop my function, which I need is the Continuous mode, in this mode can keep CS low until data send up.

Best wishes,

Sc

0 Likes