AnsweredAssumed Answered

Need help with configuring eDMA Software TCD for two-level dma transfer

Question asked by Duane Owens on Jan 12, 2017
Latest reply on Jan 20, 2017 by Duane Owens

Hi Folks, I am building an application that will use the eDMA in the Kinetis K64F MCU. I need help in setting up the eDMA as a two-level dma transfer.

I am just focused on one TCD for the moment (once I understand the configuration case, I can replicate it in other areas of my code).

1) I am transferring 32bits of data per transfer.

2) The transfer will be triggered by a single software trigger by setting the CR.START to true.

3) Here's a list of software and hardware addresses:

OFFSET   SOURCEDESTINATION   OFFSET
0x1FFF14800x4004A008
0x40x1FFF14840x4004A00C0x4
0x40x1FFF14880x4004B0000xFF4
0x40x1FFF148C0x4004B0040x4
*Note: Source & Destination sizes are 4 bytes (32bits)

 

3) I believe that the entire transfer will have to be done using minor and major loops, along with minor and major channel linking back to itself in order to trigger the channel requests

4) I know that I can do it by breaking it into two transfers, but I'd rather get a two-level configuration working because it will save me some memory on extra swTCD's.

5) Here's what I think the swTCD should look like:

SADDR =     0x1FFF1480 
SOFF =     0x4 
ATTR =     0x202 
NBYTES =     0x8 
SLAST =     0x0 
DADDR =     0x4004A008 
DOFF =     0xFF4 
CITER =     0x2 
DLAST_SGA = 0x0
CSR =     0x1 
BITER =     0x2 
 
DMA_BWR_CR_CLM(DMA_UNIT, true);
DMA_BWR_CR_EMLM(DMA_UNIT,true);

 

Am I close?

 

Thank you very much!

Outcomes