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.

Some problem about EDMA3

I want to transfer 65536 btyes of data in two bcnts,and each bcnt contains 32768 bytes,but the result is I can only receive the first bcnt,is there any problem?Below is part of my program:

myParamSetup.srcAddr = (Uint32)pm;        
     myParamSetup.aCntbCnt = CSL_EDMA3_CNT_MAKE(32768,2);    
     myParamSetup.dstAddr = (Uint32)breceive;       
     myParamSetup.srcDstBidx = CSL_EDMA3_BIDX_MAKE(32768,32768);    
     myParamSetup.linkBcntrld = CSL_EDMA3_LINKBCNTRLD_MAKE (CSL_EDMA3_LINK_NULL, 0);
     myParamSetup.srcDstCidx = CSL_EDMA3_CIDX_MAKE(0,0);    
     myParamSetup.cCnt = 1;

  /** write structure myParamSetup' value  into parameter set0 **/         
     status = CSL_edma3ParamSetup(hParamBasic0,&myParamSetup);
     if (status != CSL_SOK) {
         printf ("Edma param setup failed\n");
         return;
     }
  
  /** Manually trigger the channel **/
     status = CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_SET,NULL);
     if (status != CSL_SOK) {
         printf ("Edma channel set command failed\n");
         return;
     }

 

  • Kaiqi Yang,

    Divide ACNT by 2 and multiply BCNT by 2 and adjust the other parameters accordingly.

    Since you did not mention a device, I cannot point you to the specific EDMA3 User's Guide, but you probably already have that available. There is a table in that document in a section about the PaRAM that may be called something like "EDMA3 Channel Parameter Description". This table describes the types and ranges of all the parameter fields, so you can make sure all of your numbers fit within those ranges.

    Regards,
    RandyP

     

    If you need more help, please reply back. If this answers the question, please click  Verify Answer  , below.

  • RandyP,

    I guess I did the right thing-divide ACNT by 2 and multiply BCNT by 2 and change the srcbidx and dstbidx,but I didn't get the right answer either.By the way,I am using C6474.

  • Have you found the table I mentioned in the EDMA3 User's Guide for the C6474? Have you compared your values to the descriptions in that table?

    You need to divide ACNT by 2 and multiply BCNT by 2 from the values shown above, not from your original plan. Or I can re-word it as divide ACNT by 4 and multiply BCNT by 4.

    For ease of debug, make sure your src and dst addresses are in external memory. You can change them once you get it working, if needed.

    What is in your OPT register?

    Regards,
    RandyP