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.

LSU busy after an EDMA transfer

hello everyone, 

      I'm testing a scenario of communication between 2 DSPs (C6678) using the peripheral SRIO . i transfer data from  DSP1 using SRIO to a memory (MSMC)  in DSP2 , then i move data using EDMA  to L2 memory .  The problem i get is when i want to send a doorbell transaction to DSP1 , after doing a first transfer with EDMA i found the LSU busy .

please i want to know if there is a conflict between EDMA and SRIO .

Thanks .

Regards.

yousra

  • Hi Yousra,
    Which example is used for transfer? Are you working with MCSDK example or custom one?
    Thank you.
  • Hi Rajasekaran,
    i'm working on a custom one based on CSL library for both SRIO(using diectIO operation) and EDMA transfer .
    Thank you.
    Regards,
    Yousra
  • Hi,

    Have you using EDMA for SRIO transfer? For my understanding you can use the EDMA for move the MSMC memory data to L2 memory. Is it correct?

    After first SRIO transfer other end DSP sends the transfer success completion code. If the transfer is failed or not get response from other end DSP means the LSU is locked for specific transfer. How many LSU implemented on your test code? 8 LSU available on C6678 device for each core, user can also use all the LSU for single core. For more information refer SRIO user guide.

    Thanks,
  • Hi ,
    thank you , in my case i dont use EDMA for SRIO .
    In my application,core0(dsp2) is received data from dsp1 via srio and store the data at 0x0C100000. And core0 use EDMA to move the data from 0x0C100000 to core0 L2(0X10800000).
    there is a possibility to transfer data directly to L2 but my objectif is to do the transfer to a shared memory (MSMC).

    Thanks,

    Regards,

    Yousra.
  • Hi,

    I think EDMA does not effect the SRIO LSU. Better to command the EDMA part code and test the SRIO transfer. Please provide more information on previous post second question.

    Thanks,
  • Hi ,
    okey , thank you for reply .
    in fact the problem is :


    i use the code as follow for the EDMA transfer :

    Int32 edma_transfer (Int32 instNum, Uint8 channelNum,Uint8* srcBuff1,Uint8* dstBuff1,int ACNT, int BCNT)
    {
    CSL_Edma3Handle hModule;
    CSL_Edma3Obj edmaObj;
    CSL_Edma3ParamHandle hParamPing;
    CSL_Edma3ChannelObj chObj;
    CSL_Edma3CmdIntr regionIntr;
    CSL_Edma3ChannelHandle hChannel;
    CSL_Edma3ParamSetup myParamSetup;
    CSL_Edma3Context context;
    CSL_Edma3ChannelAttr chAttr;
    CSL_Status status;

    /* Module initialization */
    if (CSL_edma3Init(&context) != CSL_SOK)
    {
    printf ("Error: EDMA module initialization failed\n");
    return -1;
    }

    /* Open the EDMA Module using the provided instance number */
    hModule = CSL_edma3Open(&edmaObj, instNum, NULL, &status);
    if ( (hModule == NULL) || (status != CSL_SOK))
    {
    printf ("Error: EDMA module open failed\n");
    return -1;
    }

    /* Channel open */
    chAttr.regionNum = CSL_EDMA3_REGION_GLOBAL;
    chAttr.chaNum = channelNum;
    hChannel = CSL_edma3ChannelOpen(&chObj, instNum, &chAttr, &status);
    if ((hChannel == NULL) || (status != CSL_SOK))
    {
    printf ("Error: Unable to open EDMA Channel:%d\n", channelNum);
    return -1;
    }

    if(!instNum)
    {
    /* For first EDMA instance there are only 2 TCs and 2 event queues
    * Modify the channel default queue setup from 0 to 1
    */
    if (CSL_edma3HwChannelSetupQue(hChannel,CSL_EDMA3_QUE_1) != CSL_SOK)
    {
    printf ("Error: EDMA channel setup queue failed\n");
    return -1;
    }
    }
    else
    {
    /* For EDMA instance 1 and 2 maximum of 4 TCs and 4 event queues are supported
    * Change Channel Default queue setup from 0 to 3
    */
    if (CSL_edma3HwChannelSetupQue(hChannel,CSL_EDMA3_QUE_3) != CSL_SOK)
    {
    printf ("Error: EDMA channel setup queue failed\n");
    return -1;
    }
    }

    /* Map the DMA Channel to PARAM Block 2. */
    CSL_edma3MapDMAChannelToParamBlock (hModule, channelNum, 2);

    /* Obtain a handle to parameter set 2 */
    hParamPing = CSL_edma3GetParamHandle(hChannel, 2, &status);
    if (hParamPing == NULL)
    {
    printf ("Error: EDMA Get Parameter Entry failed for 2.\n");
    return -1;
    }

    /* Setup the parameter entry parameters (Ping buffer) */
    myParamSetup.option = CSL_EDMA3_OPT_MAKE(CSL_EDMA3_ITCCH_EN, \
    CSL_EDMA3_TCCH_DIS, \
    CSL_EDMA3_ITCINT_DIS, \
    CSL_EDMA3_TCINT_EN, \
    0, 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 = (Uint32)srcBuff1;
    myParamSetup.aCntbCnt = CSL_EDMA3_CNT_MAKE(ACNT,BCNT);
    myParamSetup.dstAddr = (Uint32)dstBuff1;
    myParamSetup.srcDstBidx = CSL_EDMA3_BIDX_MAKE(ACNT,ACNT);
    myParamSetup.linkBcntrld= CSL_EDMA3_LINKBCNTRLD_MAKE(0xFFFF,BCNT);
    myParamSetup.srcDstCidx = CSL_EDMA3_CIDX_MAKE(0,0);
    myParamSetup.cCnt = 1;

    /* Ping setup */
    if (CSL_edma3ParamSetup(hParamPing,&myParamSetup) != CSL_SOK)
    {
    printf ("Error: EDMA Parameter Entry Setup failed\n");
    return -1;
    }
    /* Interrupt enable (Bits 0-1) for the global region interrupts */
    regionIntr.region = CSL_EDMA3_REGION_GLOBAL;
    regionIntr.intr = 0x0;
    regionIntr.intrh = 0x0;
    CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_INTR_ENABLE,&regionIntr);


    /* Trigger channel */
    CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_SET,NULL);



    // st=_CSL_tscRead();
    /* Poll on IPR bit 0 */
    do {
    CSL_edma3GetHwStatus(hModule,CSL_EDMA3_QUERY_INTRPEND,&regionIntr);
    } while (!(regionIntr.intr & 0x1));

    // fn=_CSL_tscRead();

    /* Clear the pending bit */
    CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_INTRPEND_CLEAR,&regionIntr);

    /* Close channel */
    if (CSL_edma3ChannelClose(hChannel) != CSL_SOK)
    {
    printf("Error: EDMA Channel Close failed\n");
    return -1;
    }

    /* Close EDMA module */
    if (CSL_edma3Close(hModule) != CSL_SOK)
    {
    printf("Error: EDMA Module Close failed\n");
    return -1;
    }

    /* The test passed. */
    return 0;
    }

    in main :


    value = CSL_FEXTR(hSrio->LSU_CMD[LSU0].RIO_LSU_REG6, 31, 30);
    printf("busy BEFORE=%d\n", value);

    /* EDMA transfer */
    i=edma_transfer (1, 0, buff_tmp1, buff_tmp2, 1, 1024) ;

    value = CSL_FEXTR(hSrio->LSU_CMD[LSU0].RIO_LSU_REG6, 31, 30);
    printf("busy AFTER=%d\n", value);

    then i get :

    busy BEFORE= 0
    busy AFTER= 2


    i could not understand this behavior !!!!!

    Thanks,

    Regards,

    Yousra.
  • Hi,

    If you command the EDMA code part, the SRIO transfer contentiously works without LSU busy bit?

    I am not expert on EDMA, I will check with peripheral experts and get back to you.

    Thanks,
  • Hi, 

    no but the SRIO transfer works in DSP1 the problem is in DSP2 when we try to send a doorbell transaction to DSP1 .

    Thanks,

    Regards,

    Yousra.

  • Hi,

    If you disable the doorbell interrupt the SRIO transfer works properly? If yes, better to use the MCSDK SRIO DIO example, LSU interrupt is enabled in this example. It works fine you implement the SRIO doorbell interrupt.

    Refer below e2e threads it help you for SRIO doorbell interrupt
    e2e.ti.com/.../1150613
    e2e.ti.com/.../1321260

    Thanks,
  • Hi,
    the SRIO transfer doesn't work also for the other transaction but when we remove the EDMA SRIO transfer works(doorbell is send to DSP1) .
    we verify that the problem is at this 2 functions :

    CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_SET,NULL);

    CSL_edma3GetHwStatus(hModule,CSL_EDMA3_QUERY_INTRPEND,&regionIntr);



    Thanks,

    Regards,

    Yousra.