You are here

IMPORTANT: complete broken implementation of the SPI access API in the SDK, please help !!! | Cypress Semiconductor

IMPORTANT: complete broken implementation of the SPI access API in the SDK, please help !!!

Summary: 0 Replies, Latest post by MCM on 06 Mar 2014 07:54 AM PST
Verified Answers: 0
Log in to post new comments.
user_2208888's picture
38 posts

 Hello all, I found the cyu3spi.c file containing the source code of the SPI master access API.

And I was looking specially to the implementation of  the functions: CyU3PSpiTransmitWords() and CyU3PSpiReceiveWords() to observe to my amazement that they are fully and totally useless for any non-trivial SPI slave.

That is the CyU3PSpiTransmitWords() is transmitting the data TOATLLY discarding the device response, it even has the RX channel disabled !!! and the CyU3PSpiReceiveWords() just send 0 as data in while reading the data out. Of course no sane SPI device in the world works like that, for example image sensors that have SPI interfaces needs an input  pattern (register address)  to output meaningful data  and so on.

Actually I could not think of a more broken and useless SPI master access implementation , so I kindly ask you for help:

is there some sane SPI function where someone can input a pattern and read the result, as all the SPI devices in the world expect, or do I need to rewrite the whole SPI module ?

If it's not , then assuming that I don't include the header provided by the SDK, can I use my own fully re-implementation of the cyu3spi.c  ( including initialization and configuration ), with changed function names,  without conflicting with the exiting one in the library ( including eventual global state variables ) ?

Also, a very important question, it seems that the slave select pin toggles after each byte no matter the configured SPI word size if the configuration is selected to have the library function taking care of it and not the frimware, this also an enormous bug, is this so, or I misunderstand ?

Please help and eventually include in a future version of the SDK a function that reads the RX data for a given TX data.


 Many thanks in advance,




Log in to post new comments.