Im just starting to investigate communicating between 2 F28027 devices using SPI (in 4-wire mode, with FIFOs).
What is the sequence of events that should occur for the master to read an arbitrary length of 8-bit byte data from the slave? I did look at the SPI reference guide but didn't understand it anywhere near enough!
What I *think* I understand so far is:
- The slave requests communication when it has something to say. I have a GPIO line as a service request (SRQ) line set up with and interrupt on the master for this purpose.
- The master then sets SPISTE, starts outputting the SPICLK and should be made to shift out dummy data on MOSI.
- Then as the dummy data shifts in on the slave, the slave also shifts out the data it wants to transmit, on MISO.
So the questions I have start with, does the master need to continue to transmit dummy bytes for as long as it wishes to receive data bytes from the slave?
And if so how should the master "know" how many bytes the slave wants to send, i.e how many dummy bytes should be transmitted?
Also, how does the TALK bit come into this? should it be set by both devices for the duration of the transfer?
Thanks