AnsweredAssumed Answered


Question asked by Michael Raitman on Jul 13, 2011
Latest reply on Aug 23, 2013 by Riccardo Catto

Any examples of using a DMA channel with the SPI?   


 I want to modify a driver I have that interfaces to an external NOR flash part to use DMA to write and read the data.   Currently, the driver code just brute force loops through the data to write or read

and consumes the processor while doing so.


How do you set up the DMA to fill the TXFIFO in the SPI, and also DMA out of the RXFIFO queue?


What goes into the TXFIFO queue?   It normally holds both SPI command and data.  So, do you have to append that command data to the buffer of data to DMA and then let it DMA it?


What kind of loop do you set up for the DMA?   The Fifo queues are only four enties long, but I'll probably want to

read/write 1024 bytes each time, as this interfaces to a flash file system.


Will I need to copy the data to a static buffer, ro can I point the DMA to a buffer the caller provides?