I have problems with SPI on the Jacinto 5 Eco board.
I log CS, CLK, MOSI and MISO on an oscilloscope and all signals look good. I can see the response from the EEPROM that I communicate with and it is the expected one.
The procedure is this:
I send WREN (write enable) to the EEPROM, one 8bit word. I expect no response to this.
Then I send a READ_STATUS command which means I first send the command then a dummy word to get the response. So 2 8bit words.
I see the response but I get no data in the Rx register.
If I send another 2 dummy words I get data in the register. Obv this is not a solution but it should say something about what I am doing wrong.
Another thing I noticed is that the first time I write WCNT to the XFERLEVEL register it sticks. However when I write 2 the second time around for the READ_STATUS command the value 0 is in the reg instead of 2. I check this just after writing so it shouldn't have started to send yet (and thus decrementing).
However the value I write does have an affect, if I write 2 it sends 2 words and if I write 4 it sends 4 words.
I use FIFO, SINGLE and FORCE to keep the chip select active between words. I follow the procedure from the reference manual.