Cy_SCB_SPI_Transfer bug

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

cross mob
EdHa_4455331
Level 5
Level 5
25 replies posted 25 sign-ins 10 replies posted

I think that I have pretty compelling evidence that Cy_SCB_SPI_Transfer() does not work correctly when oversampling is 4 and relatively long spi exchanges are requested.

Basically, if I try one long exchange, Cy_SCB_SPI_Transfer() fails to complete correctly. If I chop up the long exchange into a sequence of smaller exchanges with each the length of each exchange being shorter than the Tx/Rx fifo (128 bytes), the system does not lock up.

Of course, this creates other problems because the enable signal is cleared after each shorter block and the target device can't handle that. I worked around that by using another I/O pin as the enable and manually controlling it.

Anyhow, if anyone has any ideas as to how to fix Cy_SCB_SPI_Transfer() I'd be glad to hear it. Otherwise, what is the proper/best way to bring this issue to the attention of the Cypress damage control team?

Thanks,

Ed H.

0 Likes
1 Reply
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi EdHa_4455331​,

You have reported the issue in the right forum. Firstly, we would like to confirm that this is a bug. Could you please send us a sample project to us so that it would help us reproduce the issue? Once confirmed, we will file a defect to the software team.

One more better option for you would be to use DMA since it can perform the transactions without any need for CPU intervention. Also, DMA is preferred if you want to perform such bulk transactions. See example GitHub - cypresssemiconductorco/mtb-example-psoc6-spi-master-dma: This example demonstrates the use ...

In the mean time, can you check if you can use low level SPI driver to perform long transactions?

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes