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.

Unable to trigger EDMA manually

Hello,everyone!

I'm using C6455&CSL under SYS/BIOS to perform a simple data transfer,but now I find an interesting phenomenon:

When I choose Channel 0(HPI/PCI-to-DSPEvent),It works OK.

But when I change the channel such as the Channel 3, I can't trigger the EDMA manually. I find the EER and ESR is correct, the corresponding bit is already set 1,but the EDMA just don't start a transfer.

I've checked my param set mapped to the channel, but it seems all right.

Can anybody helps me?Thank you very much.

Part of my code :

status = CSL_edma3Init(&context);

     /* Edma module open */
     hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);

     /* Edma module setup */
     dmahwSetup.paramNum = 0;
     dmahwSetup.que      = CSL_EDMA3_QUE_0;
     hwSetup.dmaChaSetup = &dmahwSetup;
     hwSetup.qdmaChaSetup = NULL;
     status = CSL_edma3HwSetup(hModule,&hwSetup);

     /* Setup the DRAE masks
      * DRAE enable(Bits 0-15) for the shadow region 1.
      */
     regionAccess.region = CSL_EDMA3_REGION_1 ;
     regionAccess.drae =   0xFFFF ;
     regionAccess.draeh =  0x0000 ;
     status = CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_DMAREGION_ENABLE, \
                                 &regionAccess);

     /* Channel open */
     chAttr.regionNum = CSL_EDMA3_REGION_1;
     chAttr.chaNum = CSL_EDMA3_CHA_3;
     hChannel = CSL_edma3ChannelOpen(&chObj, CSL_EDMA3, &chAttr, &status);

     /* Get the parameter handle */
     hParamBasic = CSL_edma3GetParamHandle(hChannel,0,&status);

     /* Edma parameter entry Setup */
     myParamSetup.option = CSL_EDMA3_OPT_MAKE(CSL_EDMA3_ITCCH_DIS, \
                                              CSL_EDMA3_TCCH_DIS, \
                                              CSL_EDMA3_ITCINT_DIS, \
                                              CSL_EDMA3_TCINT_EN,\
                                              1,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)SrcBuf;
     myParamSetup.aCntbCnt = CSL_EDMA3_CNT_MAKE(16,1);
     myParamSetup.dstAddr = (Uint32)Shared_BufA;
     myParamSetup.srcDstBidx = CSL_EDMA3_BIDX_MAKE(0,0);
     myParamSetup.linkBcntrld = CSL_EDMA3_LINKBCNTRLD_MAKE (CSL_EDMA3_LINK_NULL,
                                                            1);
     myParamSetup.srcDstCidx = CSL_EDMA3_CIDX_MAKE(0,0);
     myParamSetup.cCnt = 1;
     status = CSL_edma3ParamSetup(hParamBasic,&myParamSetup);

  CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_CLEAR,NULL);
     CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_ENABLE,NULL);

     /* Hook up the EDMA event with an completion code function handler */
     EdmaEventHook(1, isr_src_A);

     /* Enable interrupts */
     regionIntr.region = CSL_EDMA3_REGION_1 ;
     regionIntr.intr = 0x2 ;
     regionIntr.intrh = 0x0 ;
     status = CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_INTR_ENABLE,&regionIntr);

     /* Manually trigger the channel */
     status = CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_SET,NULL);

  • Zhao Shui,

    Some of your code is recognizable from some of our CSL examples that are bad. These have been fixed for later devices but they may not have been fixed for the C6455. You may want to make sure you have the latest CSL for the C6455, but I will not promise that all of the examples have been fixed.

    In particular, look for "dmahwSetup.que" instead of "dmahwSetup[0].que" or any other number. dmahwSetup is supposed to be an array of structs and the array length is supposed to be the number of DMA channels in the target device.

    There is a working example that you can start again from in the forum post at http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/112/p/164753/601784.aspx#601784 .

    Please let me know if this works for you or if you have any additional problems.

    Regards,
    RandyP

  • Hi,RandyP

    Thank you for your advice and your working example is a great help to me.

    Now my problem is solved, but the Bad CSL examples do drive me mad ,since I have no idea about where the problem lies.

    But unfortunately, it seems that TI won't offer further suppout for C6455 on CSL, is that right?

    Zhao shui