I am using the SSI peripheral as an SPI Slave
I need to empty the Tx FIFO prior to beginning a uDMA transfer to a Master
There seems to be no way to clear the FIFO to a known state. This means that the FIFO may, or may not, have residual data in it that the SPI Master is not expecting
If the Master fails to read the entire transfer and initiates another it will receive stale data that remains in the FIFO.
If I switch to Slave mode to attempt to clear the FIFO the Clock signals are driven from both the Master and Slave (not good!)
Enabling / disabling the SSI peripheral has no effect. I see no way short of a power cycle to clear the FIFO.
I can detect it: SSICR1 = 0x06 (Slave / Enabled) SSISR = 0x10 ( Busy/Tx FIFO Full )
The receive FIFO can be cleared in either Master or Slave mode easily, the Tx FIFO in Master mode is continually emptied, but in Slave mode there is an issue!
May have answered my own question: The only way I have found to clear the FIFO is to Issue a software reset in the SRSSI register and reprogram the SSI peripheral. Seems like a crude solution. So my question still stands...
I need a way to empty the FIFO - help?