I am using the SPI in DMA mode. I have setup the DMA to use circular buffer by calling "EDMA_SetModulo()"
The circular buffer feature only need for the receiving data on the SPI.
The call process goes like this
- Setup DMA as usual
- call this EDMA_SetModulo() with the destination set to kEDMA_Modulo512bytes. The destination of the DMA is the RAM, the source of the DMA is the SPI RX register.
- Finish setting up the SPI in DMA Mode
- call DSPI_SlaveTransferEDMA() with the rxData pointer pointing to a 512byte buffer.
After the master has transfer a total of 512 byte the DMA callback runs as expected but after this point if the master start sending more data nothing happens. I think after every DMA transfer complete runs I need to call "DSPI_SlaveTransferEDMA()" method again.
Which makes no sense if my DMA is in circular buffer mode.
Can someone let em know what I may be doing wrong.
I looks like the SPI_EDMA driver doesn't support setting up the DMA in circular buffer mode. I had edited the SPI_EDMA driver to correctly setup the ATTR register but it still doesn't work.
When EDMA_DspiSlaveCallback() it disable the DMA, but if I remove this call, it still does not work. Can anyone offer me some insight?