I'm using an LM4F with an external SPI flash which appears to work in a reasonably nonstandard way. The way this chip functions is that to read data, I first do a write with the command and the address bits. At that point the chip takes over, and as long as CE#/SSFRAME is held high, data is returned forever for the entire length of the chip.
As far as I know, I have no mechanism to hold CE#/SSFRAME high, and so can't guarantee how long this is held high for. I have two questions:
- Is there a way to clear the processor's receive fifo? This would let me read just the first element or two of data (if they exist) and then clear the fifo and try to read again
- Is all data for this transaction put into the receive fifo? That is, since the data format is <write> <write> <write> <write> <chip returns data> <chip returns data> <chip returns data> <chip returns data>, will TI put data into the receive fifo while CE# was high but we were transmitting, or will it only put data into the receive fifo from when CE was high but we were not transmitting?
Thanks!