This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

A simple array copy using EDMA

Other Parts Discussed in Thread: TMS320C6678

Hi,

I was trying to copy the contents of one array into another using EDMA3 in C6678. I am using CSL for this and the initialization procedure is done as per the example given in 

"....\ti\pdk_C6678_1_1_2_5\packages\ti\csl\example\edma". Then, for my parameter setup, i am using the following:

myParamSetup.option = CSL_EDMA3_OPT_MAKE(CSL_EDMA3_ITCCH_DIS, \

                                                                                               CSL_EDMA3_TCCH_DIS, \
                                                                                               CSL_EDMA3_ITCINT_EN, \

                                                                                               CSL_EDMA3_TCINT_EN, \
                                                                                               0, CSL_EDMA3_TCC_NORMAL,\
                                                                                               CSL_EDMA3_FIFOWIDTH_NONE, \
                                                                                               CSL_EDMA3_STATIC_DIS, \
                                                                                               CSL_EDMA3_SYNC_A, \
                                                                                               CSL_EDMA3_ADDRMODE_INCR, \
                                                                                                CSL_EDMA3_ADDRMODE_INCR );
myParamSetup.srcAddr = (Uint32)A;
myParamSetup.aCntbCnt = CSL_EDMA3_CNT_MAKE(4,1000);
myParamSetup.dstAddr = (Uint32)B;
myParamSetup.srcDstBidx = CSL_EDMA3_BIDX_MAKE(4,4);
myParamSetup.linkBcntrld= CSL_EDMA3_LINKBCNTRLD_MAKE(CSL_EDMA3_LINK_NULL,0);   
myParamSetup.srcDstCidx = CSL_EDMA3_CIDX_MAKE(0,1);
myParamSetup.cCnt = 1;

A & B are arrays declared globally.

Now, after enabling the interrupts as given in the example and polling on bit 0, the "do-While" loop is never completing execution. It runs as an infinite loop.

CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_SET,NULL);

regionIntr.region = CSL_EDMA3_REGION_GLOBAL;
regionIntr.intr = 0;
regionIntr.intrh = 0;

/* Poll on IPR bit 0 */
do {
CSL_edma3GetHwStatus(hModule,CSL_EDMA3_QUERY_INTRPEND,&regionIntr);
} while (!(regionIntr.intr & 0x0));            /*Never Exeting This Loop*/

Can someone please suggest me with the mistake i am doing.

Varun

  • !(regionIntr.intr & 0x0) will always return 1.  You're bitwise ANDing w/ a 0, which will always give you 0, then you're NOTing this, which will always return 1.  Thus you're stuck in the while loop.

    Have you check the PaRAM entry to see if it was consumed?  Have you check the memory location to see if data was written?  Have you visually inspected the Interrupt pend?

    Best Regards,

    Chad

  • Sorry for my Mistake. I modified it to 0x1 in my program. But still the result is the same. The data is not written in the memory location.  The function "CSL_edma3ParamSetup()" returns CSL_SOK . Can you please let me know how to visually inspect Interrupt pend?

  • Have you gone through and read the EDMA UG - It's available on the product page TMS320C6678.  I'd start there, there are a lot of status registers available to you.

    Also, like I mentioned have you inspected the PaRAM settings, before and after you kicked off the Transfer?  Did you inspect the memories?

    We want to make sure you triggered the transfer to go in the first place :-)

    Best Regards,
    Chad