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.

EDMA3 test copy data not successful.

Hiall

I tested the ti Dm8168 edma3 examples in the directory of "ti_tools\edma3lld\edma3_lld_02_11_02_04\examples\edma3_driver\src\dma_test.c" on the DSP side (c674), all the function runs are correct ,but the data copy do not successful.

The follows is I do:

#pragma DATA_SECTION(srcBuff, ".mydata");

#pragma DATA_SECTION(dstBuff, ".mydata");

EDMA3_DRV_Handle gSYSTEM_EDMA_Hndl = NULL;

  1. 1.       Get a globle edma handle, which is kind of EDMA3_DRV_Handle as follows:

A:create the instance.

   edma3Result = EDMA3_DRV_create (edma3Id, &gUtils_dmaGblCfgParams_dsp ,

                                 (void *)&miscParam); (successful)

   B:Open the Driver Instance

   hEdma = EDMA3_DRV_open (edma3Id, (void *) &initCfg, &edma3Result); (successful)

gSYSTEM_EDMA_Hndl = hEdma;

 

2  A: using the globle edma handle request channel

   tcc = EDMA3_DRV_TCC_ANY;

   chId = EDMA3_DRV_DMA_CHANNEL_ANY;

   result = EDMA3_DRV_requestChannel (hEdma, &chId, &tcc,

                                  (EDMA3_RM_EventQueue)0,

                                  &callback1, NULL);(successful)

B:Fill the PaRAM Set with transfer specific information

        paramSet.srcAddr    = (unsigned int)(srcBuff);

        paramSet.destAddr   = (unsigned int)(dstBuff);

        paramSet.srcBIdx    = srcbidx;

        paramSet.destBIdx   = desbidx;

        paramSet.srcCIdx    = srccidx;

        paramSet.destCIdx   = descidx;

        paramSet.aCnt       = acnt;

        paramSet.bCnt       = bcnt;

        paramSet.cCnt       = ccnt;

        paramSet.bCntReload = BRCnt;

        paramSet.linkAddr   = 0xFFFFu;

        /* Src & Dest are in INCR modes */

        paramSet.opt &= 0xFFFFFFFCu;

        /* Program the TCC */

        paramSet.opt |= ((tcc << OPT_TCC_SHIFT) & OPT_TCC_MASK);

        paramSet.opt |= (1 << OPT_ITCINTEN_SHIFT);

        paramSet.opt |= (1 << OPT_TCINTEN_SHIFT);

 

        if (syncType == EDMA3_DRV_SYNC_A)

            {

            paramSet.opt &= 0xFFFFFFFBu;

            }

        else

            {

            /* AB Sync Transfer Mode */

            paramSet.opt |= (1 << OPT_SYNCDIM_SHIFT);

            }

   result = EDMA3_DRV_setPaRAM(hEdma, chId, &paramSet); (successful)

C: enable transfer

   result = EDMA3_DRV_enableTransfer (hEdma, chId,

                                  EDMA3_DRV_TRIG_MODE_MANUAL); (successful)

   /* Wait for the Completion ISR. */

   while (irqRaised1 == 0u)

   {

       /* Wait for the Completion ISR. */

       Vps_printf ("waiting for interrupt...irqRaised1%d\n",irqRaised1); 

   }

 This step is also work!

D: check whether the EDMA is worked.

 But the data copy do not work form srcBuffer to dstBuff. All of the dstBuff data is 0.

 for (i = 0u; i < (acnt*bcnt*ccnt); i++)

{

 if (srcBuff[i] != dstBuff[i])

 {

     Istestpassed = 0u;

     Vps_printf("qdma_test: Data write-read matching FAILED" \

               " at i = %d\r\n", i);

     break;

 }

}

Note : ".mydata"  is  the segement of the DDR map to DSP heap, that memory cache disableded . so here I do not enable the  EDMA3_ENABLE_DCACHE.

Could you give me some advise ? thank you .