AnsweredAssumed Answered

ADSP-21065L Memory DMA

Question asked by Laz on Jan 5, 2010
Latest reply on Jan 21, 2010 by jeyanthi.jegadeesan

I am supporting a legacy product that is using the 21065L.  I would like to replace a memcpy() with a DMA copy to improve the throughput.


The original code is:


UNSIGNED32 *extMem = 0x10000000;

UNSIGNED32 *intMem = 0x0000D000;


memcpy(extMem, intMem, 100);


The DMA code is:

    // DMA off
    *pDMAC1 = 0;

    // set DMA control regs
    *pIIEP1 = (UNSIGNED32)(intMem); // internal RAM     
    *pIMEP1 = 1; // single increment
    *pCEP1 = 100; // count
    *pEIEP1 = (UNSIGNED32)(extMem); // external RAM
    *pEMEP1 = 1; // single increment
    *pECEP1 = 100; // count

    // turn DMA on
    *pDMAC1 = (DEN | TRAN | MASTER);

    // wait for DMA to finish, to keep the same flow as with memcpy
    while ((*pDMASTAT & DMA7ST) != 0);  

When I run this, nothing happens.  It doesn't hang, it just falls through with no memory writes at all.


I'm sure it's something simple, as I'm not familiar with this device.