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.

problems about C6455 chainning EDMA3 channels

6116.Edma_xfer.rarHello!   I'm trying to use CSL library to make a test about the chain mode of EDMA3 on the DSK6455 board.

I want to chain the channel 0 and channel 8 to start two diffrent data transfers, but the result is that the first transfer of channel 0 is done while the channel 8 tansfer is failed. I view the memory and the sencond transfer isn't starting correctly indeed. I don't know if the configurations of the EDMA3 registers are right.

So I need your help! Here is my code below! 

 Thank you very much for your help!

 

  • Thomas, 

        Did you compare the register settings for channel 0 to those with channel 8? I would recommend that you verify your settings for channel 8 are correctly configured.

    Also - did you verify that channel 0 is correctly set to trigger a channel 8 transfer?

  • Dear Drew,

          Thank you for your advice!  I want to chain channel 0 to channel 8 but failed.

    Here is channel 0 param set:

    /////////////////////////////////////////////////////////////////////////
    myParamSetup.option = CSL_EDMA3_OPT_MAKE( CSL_EDMA3_ITCCH_DIS, \
                                              CSL_EDMA3_TCCH_EN, \
                                              CSL_EDMA3_ITCINT_DIS, \
                                              CSL_EDMA3_TCINT_EN,\
                                              8, CSL_EDMA3_TCC_NORMAL,\
                                              CSL_EDMA3_FIFOWIDTH_NONE, \
                                              CSL_EDMA3_STATIC_DIS, \
                                              CSL_EDMA3_SYNC_AB, \
                                              CSL_EDMA3_ADDRMODE_INCR, \
                                              CSL_EDMA3_ADDRMODE_INCR  ); 
    myParamSetup.srcAddr = EMIFB_CE0_BASE_ADDR;        
    myParamSetup.aCntbCnt = CSL_EDMA3_CNT_MAKE(4,DATA_CNT);      
    myParamSetup.dstAddr = DST_ADDR;       
    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;
    //////////////////////////////////////////////////////////////////////////

    CSL_EDMA3_TCCH_EN-----------------Transfer complete chaining is enabled

    CSL_EDMA3_TCINT_EN------------------Transfer complete interrupt is enabled

    and I set tcc=8 to chain channel 8.

    and this is channel 8 param set:

    ///////////////////////////////////////////////////////////////////////////
    myParamSetup1.option = CSL_EDMA3_OPT_MAKE(CSL_EDMA3_ITCCH_DIS, \
                                              CSL_EDMA3_TCCH_EN, \
                                              CSL_EDMA3_ITCINT_DIS, \
                                              CSL_EDMA3_TCINT_EN, \
                                              1, CSL_EDMA3_TCC_NORMAL, \
                                              CSL_EDMA3_FIFOWIDTH_NONE, \
                                              TRUE,CSL_EDMA3_SYNC_AB, \
                                              CSL_EDMA3_ADDRMODE_INCR, \
                                              CSL_EDMA3_ADDRMODE_INCR );
    myParamSetup1.srcAddr = EMIFB_CE0_CHAIN_ADDR;        
    myParamSetup1.aCntbCnt = CSL_EDMA3_CNT_MAKE(4,DATA_CNT);      
    myParamSetup1.dstAddr = DST_CHAIN_ADDR;       
    myParamSetup1.srcDstBidx = CSL_EDMA3_BIDX_MAKE(4,4);    
    myParamSetup1.linkBcntrld = CSL_EDMA3_LINKBCNTRLD_MAKE(CSL_EDMA3_LINK_NULL,0);    
    myParamSetup1.srcDstCidx = CSL_EDMA3_CIDX_MAKE(0,0);    
    myParamSetup1.cCnt = 1;
    ////////////////////////////////////////////////////////////////////////

    and I set tcc=1 but the channel 1 isn't opened so it can't chain to channel 1. 

    I'm wanting for your answer. Thanks you very much!

    Thomas Young

  • Thomas,

    please read this old discussion: http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/112/p/73891/268572.aspx#268572

    I had the same problem with chaining and Mr. Randy P. helped me very well.

    Attention to these instructions that are necessary to your code in order to work with EDMA chaning:

    //declaration:

    //CSL_Edma3HwDmaChannelSetup  dmahwSetup;
    CSL_Edma3HwDmaChannelSetup    dmahwSetup[CSL_EDMA3_NUM_DMACH] =
                                    CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
    CSL_Edma3HwQdmaChannelSetup qdmahwSetup[CSL_EDMA3_NUM_QDMACH] =
                                    CSL_EDMA3_QDMACHANNELSETUP_DEFAULT; 

    //source code

      /* Edma module setup */

        dmahwSetup[0].paramNum = 0;                    // not needed, default
        dmahwSetup[0].que      = CSL_EDMA3_QUE_0;    // not needed, default
        dmahwSetup[8].paramNum = 8;                    // not needed, default
        dmahwSetup[8].que      = CSL_EDMA3_QUE_0;    // not needed, default

    //    hwSetup.dmaChaSetup = &dmahwSetup;    //old
        hwSetup.dmaChaSetup = dmahwSetup;
    //    hwSetup.qdmaChaSetup = NULL;            //old
        hwSetup.qdmaChaSetup = qdmahwSetup;
        status = CSL_edma3HwSetup(hModule,&hwSetup);
        if (status != CSL_SOK) {
             LOG_printf (&DebugLog,"Hardware setup failed");
             CSL_edma3Close (hModule);
             return;

    Try... I think that your project will work well!!

    bye

    Stefano

  • Stefano,

             Thank you for your advice! I have seen the old discussions that really help me find the answer to the problem.

    My project fails because of the wrong handle of the channel. I used to think that the channelk setup param equals to the number of the channel.

    If the channel is N, then the param is also N. This is the key mistakes of the code and it can't trigger the second channel.

    Here is the code of get the right  PaRAM number associated with this channel .

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////

         /* Get the PaRAM number associated with this channel */
        status = CSL_edma3GetHwChannelSetupParam(hChannel,&paramNum);
        if (status != CSL_SOK)
        { 
         printf ("Edma get param failed\n");
            return;
        }  
        /* Obtain a handle to parameter set 0 */
        hParamBasic = CSL_edma3GetParamHandle(hChannel,paramNum,&status);
        if (hParamBasic == NULL)
        {
            printf ("Edma get param handle for param entry 0 failed\n");   
            return;
        }

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////

    Thank you.

    Thomas.