AnsweredAssumed Answered

Using DMA with eTPU UARTs

Question asked by Tyler Melmoth on Dec 1, 2014



I am considering using DMA to transfer data for an eTPU UART interrupt on a MCF5233 processor.  I am wondering if there are any code examples to do this, or any code examples using DMA with the eTPU at all.


Specifically, I am wondering if there is a reliable way to use DMA on more than one channel at once since all eTPU interrupts are OR'ed together to one DMA request to DMA controller 3.  With one eTPU channel using DMA, you can set the DMA source register to the relevant address in SRAM with data for that channel and it is no problem.  If multiple channels use DMA, then you could set the DMA source register to a block of RAM that includes the data for all of the channels, but I can't find a way to tell which channel generated the DMA request.  You could look at the DTRS bits to see which channels have generated a request, but I think that could lead to race conditions where the DMA transfers the data from SRAM before you have a chance to read DTRS.  Is there a solution for this or is it recommended to only use DMA for one eTPU channel?