Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Why the EDMA repeat itself forever?

$
0
0

I am using OMAP-L137, and use following function to copy memory by EDMA:

void EDMA_copy(int channel, Uint32 src, Uint32 dst, Uint32 nbytes)
{
    edma3ccRegs->ECR |= 1 << (channel);
    edma3ccRegs->SECR |= 1 << (channel);

    edma3ccRegs->PARAMSET[channel].OPT =
        CSL_FMKT(EDMA3CC_OPT_TCINTEN, DISABLE) |
        CSL_FMKT(EDMA3CC_OPT_TCCHEN, ENABLE)  |
        CSL_FMKT(EDMA3CC_OPT_STATIC, STATIC)  |
        CSL_FMK(EDMA3CC_OPT_TCC, 0);

    edma3ccRegs->PARAMSET[channel].SRC = src;
    edma3ccRegs->PARAMSET[channel].DST = dst;

    edma3ccRegs->PARAMSET[channel].SRC_DST_BIDX = 0;
    edma3ccRegs->PARAMSET[channel].SRC_DST_CIDX = 0;
    edma3ccRegs->PARAMSET[channel].LINK_BCNTRLD = 0xffff;

    edma3ccRegs->PARAMSET[channel].A_B_CNT =
            CSL_FMK(EDMA3CC_A_B_CNT_ACNT, nbytes) |
            CSL_FMK(EDMA3CC_A_B_CNT_BCNT, 1);

    edma3ccRegs->PARAMSET[channel].CCNT = 1;

    edma3ccRegs->ESR |= 1 << (channel);
}

and call the function by:

EDMA_copy(0, (Uint32)srcBuffer, dst, 8);

while(1);

it copy 8 bytes from srcBuffer to dst forever.

If I add CER in Expression watch window, the bit 0 switching between 0 and 1.

If I modify some bytes in srcBuffer, the bytes in dst changed also. It seems that the EDMA repeat itself.

I want to know how to set the EDMA to copy the memory only once.


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>