AnsweredAssumed Answered

SPI DMA problems

Question asked by Edward Crampton on Mar 6, 2013

I am currently using the TWR-K60F120 and I am having a bit of trouble getting the DMA to work with the DSPI.  I am writing a simple driver at the moment to test the DMA.  I am not using an IDE (IAR or Codewarrior) or the MQX OS for this and would just like a simple stripped down driver to get this running.  I have successfully used the DSPI with interrupts and am now moving to get it working with DMA.  I believe my problem is in the setting up of the TCD registers.  When I enable the DSPI to begin transmitting the DSPI gives me a source bus error for that dma channel and it seems to keep looping even after the CITER loop as completed.  I have looked at some examples, but so far they haven't really helped.

 

I have attached a file with my functions for initializing/setting up the SPI and DMA and my write function.  Currently I am just trying to get the TX to work, but I also need to get the RX side of things working as well.  If someone can point me to a simple test SPI and DMA that works or could point out a flaw in my set up I would appreciate it.

 

Thanks

Original Attachment has been moved to: SpiController.txt.zip

Outcomes