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.

Problem of McBSP + EDMA on C6657

Other Parts Discussed in Thread: TMDSEVM6657

Hi everyone:

I'd like to use EDMA to control the McBSP without RTOS on C6657.

The McBSP is set to configure of the I2S and enable loop-back mode.

Now, I setup the channel 36 (Mcbsp0 RX) and channel 37 (Mcbsp0 TX) of EDMA.

    // EDMA Module Initialization
    CSL_edma3Init(NULL);

    // EDMA Module Open
    hModule = CSL_edma3Open(&moduleObj, CSL_TPCC_2, NULL, &EdmaStat);

    // McBSP_0 transmit Channel Open - Channel 37 for Tx (MCBSP0_XEVT)
    chParam.regionNum  = CSL_EDMA3_REGION_GLOBAL;
    chSetup.que        = CSL_EDMA3_QUE_0;
    chParam.chaNum     = CSL_EDMA3_CHA_37;

    hChannel37 = CSL_edma3ChannelOpen(&ChObj0, CSL_TPCC_2, &chParam, &EdmaStat);
    chSetup.paramNum   = chParam.chaNum; //CSL_EDMA3_CHA_37;
    CSL_edma3HwChannelSetupParam(hChannel37, chSetup.paramNum);

    // McBSP_0 receive Channel Open - Channel 36 for Rx (MCBSP0_REVT)
    chParam.regionNum  = CSL_EDMA3_REGION_GLOBAL;
    chSetup.que        = CSL_EDMA3_QUE_0;
    chParam.chaNum     = CSL_EDMA3_CHA_36;

    hChannel36 = CSL_edma3ChannelOpen(&ChObj1, CSL_TPCC_2, &chParam, &EdmaStat);
    chSetup.paramNum = chParam.chaNum; //CSL_EDMA3_CHA_36;
    CSL_edma3HwChannelSetupParam(hChannel36, chSetup.paramNum);

Only first result (rx buffer) has non-zero value, others are zero value.

I need to reset the C6657 EVM board, and I can got this result again.

How to fix the problem? Thank you.

My Project:

I2S_Edma.zip

  • I need to reset the C6657 EVM board, and I can got this result again.

    How to fix the problem?

    Are you re-loading the application to get the result each time? What is First and second result? Is it running on loop?

    Please clarify. Thank you.
  • Hi Raja:
    My project run a loop for 10 times to do the EDMA.
    I use the loop-back mode of McBSP, and set the buffer of TX to 0x54A0~0x54AF.
    First result is happen at first power-on of EVM, and the RX buffer can receive 0x54A0~0x54AF.
    Second result is happen at otherwise (2nd~10th EDMA and re-load application). The RX buffer receives all zero data.
    Re-loading the application can't get the correct result (0x54A0~0x54AF).
    Until I power down the EVM and then power up the EVM, the program can just receive one time the correct result.
    Thank you for your prompt reply.
  • Hi,

    Thanks for your post.

    In general, it is recommended to use McBSP LLD which is available in PDK C6657 1_1_2_6 of MCSDK 02_01_01_04 and the LLD is well documented and will be updated along with MCSDK package.

    Kinldy take a look at the "MCBSP_LLD_SDS.pdf" file in "~\ti\pdk_C6657_1_1_2_6\docs" folder and the McBSP digital loopback example can be found in "~\ti\pdk_C6657_1_1_2_6\packages\ti\drv\exampleProjects" folder. Please validate your configuration with the reference example code on McBSP0 framesync, clock on both Tx. and Rx.

    As well, please  find attached one example project to demonstrate the McBSP/EDMA setup. The attached has some McBSP CSL files which is ported from other device, not existing in the current C6657 PDK package. Kindly try with this and check whether the same issue occurs or not.

    /cfs-file/__key/communityserver-discussions-components-files/791/6366.7870.4555.McBSP_5F00_EDMA_5F00_example.zip

    Please also note the McBSP have both non-FIFO and FIFO modes, The DXR and DRR addresses are different in those modes. Please refer to the C6657 memory map table for details. The example code should show the difference as well.

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------

  • Thank for your reply. It resolves my problem.

    1. Now, I want use this example to test DSP_McBSP0_RX port.
    I modified some configs as below:
    1) myglobal.dlbMode = CSL_MCBSP_DLBMODE_OFF
    2) myclkset.frmSyncRxMode = CSL_MCBSP_FSCLKMODE_INTERNAL
    3) myclkset.clkRxMode to CSL_MCBSP_TXRXCLKMODE_INTERNAL
    4) McBSP_AMC_EN = HIGH on TMDSEVM6657 (Disable McBSP of U13 SN74AVC4T245PWR)
    5) DSP_McBSP0_RX = 1.8V
    I would expect to receive all 1 but the rcvBuff0 buffer are all 0.
    How do I receive the all 1 data of rcvBuff0?

    2. Do you have an interrupt example of McBSP with EDMA?

    Thank you.