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.

C6657 McBSP Ping-Pong example

Dear expert,

I am using MCSDK v2.01.02.06, which includes the C6657 PDK v1.1.2.6, together with the C6657 EVM from eInfochips. 

I am trying to use the McBSP loopback example in a PING-PONG mode (similar to the issue/reclaim that was employed previously using DSP/BIOS), but I fear the McBSP loopback example was not designed for this and I am not exactly sure how to modify the code to achieve this. I am currently seeing breaks in the audio samples on the Dx pin and it seems to be related to the size of buffer used for txFrame.

From this previous related post:

http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/279250/1040183#1040183

it was mentioned that newer release of the MCSDK would contain such an example, but currently I could not find a newer release.

I am urgently seeking advice on how I can achieve this, as I do not have enough time to write the driver from scratch.

Many thanks in advance!

  • Hello ReinierC,
    The new release of MCSDK is on hold. I am trying to reach development team to get the MCSDK loopback example in a PING-PONG mode. Thank you.

  • Many thanks Rajasekaran, a working McBSP PING-PONG example would be VERY helpful!

    I am eagerly awaiting your response...

  • Hi Reinier,

    Thanks for your post.

    I do agree that, C6657 which has a McBSP digital loopback example but it is not designed to use it for ping pong mode but as you quoted the above E2E post tagged by " alessandro scotto" in which, he had attached a sample example project for C6655 McBSP0 with 64 timeslot, 32bit word, and BFIFO in a ping pong application with EDMA3 configuration. I belive, the same ping pong code should work for C6657 too except we should modify the code for C6657 platform level changes and other than this, the same code should work for C6657 too for ping pong mode. Why don't you try his attached example project since he had tested the McBSP-EDMA configuration with FIFO buffers in a ping pong fashion and it seems the system is working well with the ping pong application. Please try the attached zip file "5224.versione 32 bit.zip" from the below post:

    https://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/279250/1040183

    For time being, you could use the above attached code tentatively and modify the code changes for C6657 platform till the next release of MCSDK 2.1.3 is available.

    Thanks & regards,

    Sivaraj K

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

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

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

  • Hi Sivaraj,

    Thank you for your response.

    I had a quick look at his project yesterday. However, this is not official TI released code and also does not have proper documentation. Therefore the risk of losing a lot of time (which I have very little of) on trying to hack it work for our project is just too great.

    Coming from the C6748 DSP, it seems that the quality of TI's provided software for the C66x platform has significantly deteriorated compared to the C64x and C64x+ platforms. This is the second time that I have come across unexpected behavior of the code. With the C66x DSPLIB I was shocked to find that the routines are no longer hand optimized Assembler. Are TI no longer investing that much in DSP development?

    Is there really no other PING-PONG based driver/example available for the McBSP on the C66x platform? When will MCSDK 2.1.3 be released?

    I am sorry, my intention is not to vent on you, it is just somewhat frustrating to upgrade to a new DSP only to find that we cannot expect the same level of software support.

  • Hi Reinier,

    Thanks for your update.

    There is a EDMA test code available on C6678 and there is a example routine which perform EDMA ping pong buffer transfer using a QDMA Channel. Maybe, you could review the EDMA PING PONG test code over the shadow region for QDMA channel and I would suggest you to modify the McBSP digital loopback example code to try it for EDMA ping pong configuration.

    The EDMA ping pong test code implemenation are stepped below:

    *          - Intializes and Opens the EDMA Module .

    *          - Sets up the interrupt for the EDMA global region.

    *          - Sets up the EDMA module using the API csl_edma3Hwsetup ()

    *          - Enables the EDMA global region

    *          - Opens the channel 'channelNum' get the param handle for PARAM 1, 2

    *          - PING is mapped to PARAM Entry 1

    *          - PONG is mapped to PARAM Entry 2

    *          - PING is Linked with PONG...

    *          - Enables the EDMA interrupt using CSL_EDMA3_CMD_INTR_ENABLE.

    *          - Enables Interrupt (Bit 0-2) for the global region interrupts

    *          - Manually triggers the DMA channel 'channelNum'(This should be PING)

    *          - Polls on IPR bit 0 (Since TCC for PING is 0)

    *          - Clear the pending bit

    *          - Manually triggers the channel 'channelNum' (This should be PONG)

    *          - Polls on IPR bit 1 (Since TCC for PONG is 1)

    *          - Clears the pending bit

    *          - Compares the data in the destination buffer is proper or not.

    *          - Closes the EDMA module and channel.

    The EDMA PING PONG test code source is available at the below pdk_C6678_1_1_2_6 installation path which is part of MCSDK 2.01 insstallation

    ~\pdk_C6678_1_1_2_6\packages\ti\csl\example\edma\edma_test.c

    Thanks & regards,

    Sivaraj K

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

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

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

  • Hi Sivaraj,

    Thank you for the suggestion, I would have to investigate it when I have some more time available. I managed a short-term workaround in the mean time.

    How difficult would it be to port the existing C6748 BIOSPSP driver (that came with the C6748 PDK) to the C6657? This is exactly what we are looking for. I am assuming the McBSP and EDMA peripherals on the C6748 and C6657 are essentially identical?

    Regards