This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have 2 C2000 controllers that communicate with each other with SPI.
How do I know in the slave device that I received a complete message and not 2 halve messages? It looks like that the information of the rising edge of CS is lost in the hardware. So how do I know that I received the end of the message?
I am not sure what you mean "the information of the rising edge of CS is lost in the hardware"
This depends on your hardware connection. If you are using the CS (SPISTE) line, the slave will only receive data while the CS is active. If the master is toggling this appropriately for your communication link and assuming that the signals are not noisy, the slave will receive the data properly. One option on the slave side is to have a FIFO interrupt based on the number of data words transmitted. if you expect 4 words in a message, the slave could have an interrupt after 4 words.
Alternately, you might add a handshake or error checking mechanism in your protocol to detect if the slave did not receive data properly. Something you could do is send a header plus data, and then dummy data from the master. The slave can detect a proper header, receive the data, and then during the dummy data transmitted from the master, the slave could provide and ACK to the master.
The SPI protocol provides the hardware for data to move between devices, you must provide the payloads based on your application requirements.
Are you interested in the latest C2000 Piccolo F28004x MCU? Check out the LAUNCHXL-F280049C LaunchPad!
TI Forum SitemapC2000 TI Wiki Pages
C2000 Getting StartedC2000WareControlSUITE
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Mark Labbato:
In reply to evs:
Have these posts helped to answer your questions? If so, please provide your solution and verify an answer.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.