5 Replies Latest reply on Aug 22, 2019 4:34 PM by joli_601446

    SPI Slave DMA Problem: Missing bytes


      Hello, I have an application in which another processor is the Master SPI and the PSOC5 is the Slave SPI. The SPI clock is 800Khz and I would like the Master to send over 10 bytes in a burst. The Master is receiving 10-bytes back from the SPI Slave which is good. The problem is the SPI slave is not receiving all 10 bytes and the sequence is not correct.





      Originally I did not use a DMA to receive the data but the Slave was dropping bytes. So, I thought I should try using a DMA. I am fortunate to have found an example using a DMA to read the SPI Rx FIFO.


      I got the example to work but now the problem is I only receive 4 bytes of data. The SPI interrupt is set which kicks of a DMA transfer. I see the interrupt occurring 10 times which is good but the data is missing:


      I don't know what I must do to capture all of the 10-bytes form the Master SPI device.

      I would like to be able to send a burst of data rather than sending a byte and then delay and then send another byte.

      If anyone can help me with getting this to work or suggest another approach that does not require a DMA please let me know.