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.

6678 edma problem

Hi,everyone

I'm using LLD to complete a simple edma transfer but fail.

I've already red the sample provided by TI and I change the "dma_test.c" a little.Here is my code:

EDMA3_DRV_Handle hEdma;

EDMA3_DRV_Result result=EDMA3_DRV_SOK;

EDMA3_DRV_PaRAMRegs paramSet = {0,0,0,0,0,0,0,0,0,0,0,0};  

unsigned int tcc=0;

unsigned int chId=0;

result = EDMA3_DRV_requestChannel (hEdma, &chId, &tcc,(EDMA3_RM_EventQueue)0,NULL, NULL);

    /* Fill the PaRAM Set with transfer specific information */    

paramSet.srcAddr    = (unsigned int)(&Tx_block);    

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

paramSet.srcBIdx    = sizeof(Tx_block[0]);    

paramSet.destBIdx   = sizeof(Tx_block[0]);    

paramSet.srcCIdx    = 0;    

paramSet.destCIdx   = 0;    

paramSet.aCnt       = sizeof(Tx_block[0]);    

paramSet.bCnt       = block_size;    

paramSet.cCnt       = 1;    

paramSet.bCntReload = 0; 

paramSet.linkAddr   = 0xFFFFu;    

/* Src & Dest are in INCR modes */    

paramSet.opt &= 0xFFFFFFFCu;    

/* Program the TCC */    

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

 /* Disable Intermediate & Final transfer completion interrupt */    

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

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

  /* AB Sync Transfer Mode */    

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

   /*write the PaRAM Set. */    

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

result = EDMA3_DRV_enableTransfer (hEdma,chId,EDMA3_DRV_TRIG_MODE_MANUAL);

Since this is a simple test, so I doesn't use chain,link or interrupt and there is no callback function,I only want to complete a transfer and nothing more.Now there is no problem with the complie and link and the .out file can be generated.But when I debug,the EDMA seems not working and I think maybe my configuration is wrong.

Could anybody spare me some time to help find where my problem lies?

One more question,there is three EDMACC in 6678 but when I read the code I don't find something to choose which one to use,the LLD samples for 6678 seems quite different from those for 6455,and it seems(probably not right) there is less for me to config?

Thank you very much.

Zhao

 

  • Zhao,

    Please note that EDMA is working with global address, not local address. If your buffers are located in L2 SRAM, you need to assign the global address of the buffer location to EDMA paramSet. Please take a look at the previous post (such as follows) if it is the issue in your case:

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/439/p/74609/271669.aspx#271669

    For the EDMA instance number, the edma3init() in LLD should let you decide which EDMA instance (or EDMA CC)  number you are using. Please take a look at the EDMA LLD user guide for this API or the example usage in the "edma3_lld_02_11_06_01\examples\edma3_driver\src\main.c", such as 

      hEdma[i] = edma3init(i, &edmaResult);

    where "i" is the EDMA instance number.