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.

TCP3D Example Stop Executing

Hello, this is a long enough question.

I use DSP 6670 with Windows 7 PC in my work. I need to use a turbo decoder for an LTE application, so I try to run tcp3d example from pdk_C6670_1_0_0_17, but the result is not as I expected : the program stop executing (or I think it is waiting for a semaphore). The result is as follow:

[C66xx_0]
[C66xx_0] ******************************************************************
[C66xx_0]
[C66xx_0] ----- TEST #0 STARTED ------
[C66xx_0]
[C66xx_0] Reading test vector files started (including memory allocation)...
[C66xx_0] Reading test vector files complete
[C66xx_0]
[C66xx_0] ----- TEST INITIALIZATION STARTED -----
[C66xx_0]
[C66xx_0] EDMA3 LLD Initialization complete (TPCC #2, Region #3)
[C66xx_0] EDMA3 Channels opening started...
[C66xx_0] EDMA3 Channels opening complete
[C66xx_0] TCP3 Decoder Driver Initialization sequence started...
[C66xx_0] Tcp3d_getNumBuf() passed
[C66xx_0] Tcp3d_getBufDesc() passed
[C66xx_0] Tcp3d_init() passed
[C66xx_0] TCP3 Decoder Driver Initialization sequence complete
[C66xx_0]
[C66xx_0] Heap Usage/Staus
[C66xx_0] tcp3dDrvHeap : 1976 of 16384 free
[C66xx_0] tcp3dDataHeap : 991424 of 1047680 free
[C66xx_0]
[C66xx_0] ----- TEST INITIALIZATION COMPLETE -----
[C66xx_0]

After observing the program, I found that the program stop in line 463:

/* Wait for the Receive task to complete */
Semaphore_pend(semRcvDone, BIOS_WAIT_FOREVER);

Then, if I tried to comment that line, I will get the result below. As we can see, the result is wrong.

[C66xx_0]
[C66xx_0] ******************************************************************
[C66xx_0]
[C66xx_0] ----- TEST #0 STARTED ------
[C66xx_0]
[C66xx_0] Reading test vector files started (including memory allocation)...
[C66xx_0] Reading test vector files complete
[C66xx_0]
[C66xx_0] ----- TEST INITIALIZATION STARTED -----
[C66xx_0]
[C66xx_0] EDMA3 LLD Initialization complete (TPCC #2, Region #3)
[C66xx_0] EDMA3 Channels opening started...
[C66xx_0] EDMA3 Channels opening complete
[C66xx_0] TCP3 Decoder Driver Initialization sequence started...
[C66xx_0] Tcp3d_getNumBuf() passed
[C66xx_0] Tcp3d_getBufDesc() passed
[C66xx_0] Tcp3d_init() passed
[C66xx_0] TCP3 Decoder Driver Initialization sequence complete
[C66xx_0]
[C66xx_0] Heap Usage/Staus
[C66xx_0] tcp3dDrvHeap : 1976 of 16384 free
[C66xx_0] tcp3dDataHeap : 991424 of 1047680 free
[C66xx_0]
[C66xx_0] ----- TEST INITIALIZATION COMPLETE -----
[C66xx_0]
[C66xx_0]
[C66xx_0] Test vectors memory freeing started...
[C66xx_0] Test vectors memory freeing complete
[C66xx_0]
[C66xx_0] ----- TEST DE-INITIALIZATION STARTED -----
[C66xx_0]
[C66xx_0] EDMA3 Channels freeing started...
[C66xx_0] EDMA3 Channels freeing complete
[C66xx_0] TCP3 Decoder Driver De-Initialization sequence started...
[C66xx_0] Tcp3d_deInit() passed
[C66xx_0] TCP3 Decoder Driver De-Initialization sequence complete
[C66xx_0] EDMA3 LLD De-Initialization complete
[C66xx_0]
[C66xx_0] Heap Usage/Staus
[C66xx_0] tcp3dDrvHeap : 16384 of 16384 free
[C66xx_0] tcp3dDataHeap : 1047680 of 1047680 free
[C66xx_0]
[C66xx_0] ----- TEST DE-INITIALIZATION COMPLETE -----
[C66xx_0]
[C66xx_0] ----- TEST #0 PASSED -----
[C66xx_0]
[C66xx_0] +++++++++++++++++++++++ TEST #0 SUMMARY +++++++++++++++++++++++++
[C66xx_0] TCP3D Peripheral Configuration
[C66xx_0] Instance : TCP3D_A(0)
[C66xx_0] Mode Tested : LTE(1)
[C66xx_0] Double Buffer Mode : Enable(1)
[C66xx_0] Max code blocks (Input Capacity) : 86
[C66xx_0] Code blocks sent for decoding : 6
[C66xx_0] Call back counters : 0 - interrupts
[C66xx_0] (0-SOLDOUT, 0-PAUSE, 0-PENDPAUSE)
[C66xx_0] Total Notificaiton Interrupts : 0
[C66xx_0] Throughput Calculations
[C66xx_0] Total Bits Decoded : 10472
[C66xx_0] Time Taken (in cycles) : 0
[C66xx_0] Effective Throughput : (error) Mbps
[C66xx_0] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[C66xx_0]
[C66xx_0] ******************************************************************
[C66xx_0]
[C66xx_0] ******************************************************************
[C66xx_0]
[C66xx_0] ----- TEST #1 STARTED ------
[C66xx_0]
[C66xx_0] Reading test vector files started (including memory allocation)...
[C66xx_0] Reading test vector files complete
[C66xx_0]
[C66xx_0] ----- TEST INITIALIZATION STARTED -----
[C66xx_0]
[C66xx_0] EDMA3 LLD Initialization complete (TPCC #2, Region #3)
[C66xx_0] EDMA3 Channels opening started...
[C66xx_0] EDMA3 Channels opening complete
[C66xx_0] TCP3 Decoder Driver Initialization sequence started...
[C66xx_0] Tcp3d_getNumBuf() passed
[C66xx_0] Tcp3d_getBufDesc() passed
[C66xx_0] Tcp3d_init() passed
[C66xx_0] TCP3 Decoder Driver Initialization sequence complete
[C66xx_0]
[C66xx_0] Heap Usage/Staus
[C66xx_0] tcp3dDrvHeap : 1976 of 16384 free
[C66xx_0] tcp3dDataHeap : 947008 of 1047680 free
[C66xx_0]
[C66xx_0] ----- TEST INITIALIZATION COMPLETE -----
[C66xx_0]
[C66xx_0]
[C66xx_0] Test vectors memory freeing started...
[C66xx_0] Test vectors memory freeing complete
[C66xx_0]
[C66xx_0] ----- TEST DE-INITIALIZATION STARTED -----
[C66xx_0]
[C66xx_0] EDMA3 Channels freeing started...
[C66xx_0] EDMA3 Channels freeing complete
[C66xx_0] TCP3 Decoder Driver De-Initialization sequence started...
[C66xx_0] Tcp3d_deInit() passed
[C66xx_0] TCP3 Decoder Driver De-Initialization sequence complete
[C66xx_0] EDMA3 LLD De-Initialization complete
[C66xx_0]
[C66xx_0] Heap Usage/Staus
[C66xx_0] tcp3dDrvHeap : 16384 of 16384 free
[C66xx_0] tcp3dDataHeap : 1047680 of 1047680 free
[C66xx_0]
[C66xx_0] ----- TEST DE-INITIALIZATION COMPLETE -----
[C66xx_0]
[C66xx_0] ----- TEST #1 PASSED -----
[C66xx_0]
[C66xx_0] +++++++++++++++++++++++ TEST #1 SUMMARY +++++++++++++++++++++++++
[C66xx_0] TCP3D Peripheral Configuration
[C66xx_0] Instance : TCP3D_A(0)
[C66xx_0] Mode Tested : WCDMA Split(3)
[C66xx_0] Double Buffer Mode : Disable(0)
[C66xx_0] Max code blocks (Input Capacity) : 86
[C66xx_0] Code blocks sent for decoding : 32
[C66xx_0] Call back counters : 0 - interrupts
[C66xx_0] (0-SOLDOUT, 0-PAUSE, 0-PENDPAUSE)
[C66xx_0] Total Notificaiton Interrupts : 0
[C66xx_0] Throughput Calculations
[C66xx_0] Total Bits Decoded : 15360
[C66xx_0] Time Taken (in cycles) : 0
[C66xx_0] Effective Throughput : (error) Mbps
[C66xx_0] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[C66xx_0]
[C66xx_0] ******************************************************************
[C66xx_0]
[C66xx_0] ******************************************************************
[C66xx_0]
[C66xx_0] ----- TEST #2 STARTED ------
[C66xx_0]
[C66xx_0] Reading test vector files started (including memory allocation)...
[C66xx_0] Reading test vector files complete
[C66xx_0]
[C66xx_0] ----- TEST INITIALIZATION STARTED -----
[C66xx_0]
[C66xx_0] EDMA3 LLD Initialization complete (TPCC #2, Region #3)
[C66xx_0] EDMA3 Channels opening started...
[C66xx_0] EDMA3 Channels opening complete
[C66xx_0] TCP3 Decoder Driver Initialization sequence started...
[C66xx_0] Tcp3d_getNumBuf() passed
[C66xx_0] Tcp3d_getBufDesc() passed
[C66xx_0] Tcp3d_init() passed
[C66xx_0] TCP3 Decoder Driver Initialization sequence complete
[C66xx_0]
[C66xx_0] Heap Usage/Staus
[C66xx_0] tcp3dDrvHeap : 1976 of 16384 free
[C66xx_0] tcp3dDataHeap : 1025536 of 1047680 free
[C66xx_0]
[C66xx_0] ----- TEST INITIALIZATION COMPLETE -----
[C66xx_0]
[C66xx_0]
[C66xx_0] Test vectors memory freeing started...
[C66xx_0] Test vectors memory freeing complete
[C66xx_0]
[C66xx_0] ----- TEST DE-INITIALIZATION STARTED -----
[C66xx_0]
[C66xx_0] EDMA3 Channels freeing started...
[C66xx_0] EDMA3 Channels freeing complete
[C66xx_0] TCP3 Decoder Driver De-Initialization sequence started...
[C66xx_0] Tcp3d_deInit() passed
[C66xx_0] TCP3 Decoder Driver De-Initialization sequence complete
[C66xx_0] EDMA3 LLD De-Initialization complete
[C66xx_0]
[C66xx_0] Heap Usage/Staus
[C66xx_0] tcp3dDrvHeap : 16384 of 16384 free
[C66xx_0] tcp3dDataHeap : 1047680 of 1047680 free
[C66xx_0]
[C66xx_0] ----- TEST DE-INITIALIZATION COMPLETE -----
[C66xx_0]
[C66xx_0] ----- TEST #2 PASSED -----
[C66xx_0]
[C66xx_0] +++++++++++++++++++++++ TEST #2 SUMMARY +++++++++++++++++++++++++
[C66xx_0] TCP3D Peripheral Configuration
[C66xx_0] Instance : TCP3D_A(0)
[C66xx_0] Mode Tested : WIMAX(2)
[C66xx_0] Double Buffer Mode : Enable(1)
[C66xx_0] Max code blocks (Input Capacity) : 86
[C66xx_0] Code blocks sent for decoding : 5
[C66xx_0] Call back counters : 0 - interrupts
[C66xx_0] (0-SOLDOUT, 0-PAUSE, 0-PENDPAUSE)
[C66xx_0] Total Notificaiton Interrupts : 0
[C66xx_0] Throughput Calculations
[C66xx_0] Total Bits Decoded : 4560
[C66xx_0] Time Taken (in cycles) : 0
[C66xx_0] Effective Throughput : (error) Mbps
[C66xx_0] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[C66xx_0]
[C66xx_0] ******************************************************************
[C66xx_0] !!! ALL TESTS PASSED !!!

I've tried to run the program from both MCSDK_2_00_05_17 and MCSDK_2_00_09_21, but the result is still the same. Can somebody help me, please???

Thank you

  • Hi Anugerah,

    You are right. It seems to be pending on a semaphore. You definitely need the code below to wait for the code blocks to finish decoding. 

    /* Wait for the Receive task to complete */
    Semaphore_pend(semRcvDone, BIOS_WAIT_FOREVER);

    However, you have mentioned that when you enable it, the last console message that you see is 

    [C66xx_0] ----- TEST INITIALIZATION COMPLETE -----

    My guess is that the decoding has been completed but the SemRcvStart semaphore hasn't been posted from the sndBlockTaskFunc( ) function. For this semaphore to be posted, the tcp3dEventCntr should be greater than or equal to 2. 

    Can you quickly take a look at the address 0x20800000 (tcp3d_a output data) in the memory window and see if you have any valid data at that location?

    If you see valid data at that location, it means that the TCP3d has finished outputting data and is waiting for the DSP to read the samples. In other words, the notification event ISR (tcp3dEventISR) hasn't been properly setup.

    Regards,

    Arun

  • Arun, thanks a lot for your reply.

    I've checked the address 0x20800000, but it seems that there's no any valid data there as you can see in the picture I put below.

    Can you help me for the solution, please?

    Thank you

  • Can somebody help me with this problem, please? I hope it's not rude to ask again

    I'll appreciate for some helps

    Thank you

  • Hi Anugerah,

    The memory window snapshot that you have captured doesn't seem to show any values (it only shows ???? marks). This usually happens when you are trying to read from a memory address while the program is still running. Can you suspend the program execution and go to 0x20800000 (do not try to read 0x207FFFFF in the same window as shown by you since that space is reserved). If you see zeroes at 0x20800000, it means that TCP3d didn't output data. If you see non-zero values at that location, it means that TCP3d has outputted data. I'm assuming that you are trying to run this program on a 6670 EVM. 

    Hope this clarifies it. 

    Regards,

    Arun

  • Hi Anugerah,

    I ran the tcp3dtestproject from pdk_6670_1_0_0_21 (latest MCSDK) and I was able to run the executable on CCS 6670 Simulator. But when I tried running it on EVM, i was having the same issue that you had. 

    When I looked at the TCP3d registers, everything was zeroes (including PID). So i realized that the Power Domain was not enabled in tcp3d_main.c by default. Please enable the PSC function calls in the enable_tcp3d( ) API and try it again. It should work. 

    Note that you might get build errors when you change the SIMULATOR_SUPPORT flag. The definitions haven't been updated from the previous release. Please use the following sequence:

    static Int32 enable_tcp3d (void)
    {
    #ifdef SIMULATOR_SUPPORT
    /* TCP3D power domain is turned OFF by default.
    * It needs to be turned on before doing any TCP3D device register access.
    * This is not required for the simulator. */

    /* Set TCP3D Power domain to ON */
    CSL_PSC_enablePowerDomain (CSL_PSC_PD_TCP3D_A);

    /* Enable the clocks too for TCP3D */
    CSL_PSC_setModuleNextState (CSL_PSC_LPSC_TCP3D_A, PSC_MODSTATE_ENABLE);

    /* Start the state transition */
    CSL_PSC_startStateTransition (CSL_PSC_PD_TCP3D_A);

    /* Wait until the state transition process is completed. */
    while (!CSL_PSC_isStateTransitionDone (CSL_PSC_PD_TCP3D_A));

    /* Return TCP3D PSC status */
    if ((CSL_PSC_getPowerDomainState(CSL_PSC_PD_TCP3D_A) == PSC_PDSTATE_ON) &&
    (CSL_PSC_getModuleState (CSL_PSC_LPSC_TCP3D_A) == PSC_MODSTATE_ENABLE))
    {
    /* TCP3D ON. Ready for use */
    return 0;
    }
    else
    {
    /* SRIO Power on failed. Return error */
    return -1;
    }
    #else
    /* PSC is not supported on simulator. Return success always */
    return 0;
    #endif
    }

    Regards,

    Arun

  • Arun, thanks again for your help

    Actually, by doing your suggestion, the program still need some correction. So I'll explain what else that have to do to run the program

    1. If it is the pdk_6670_1_0_0_21, I need to ensure that the include path are as follow

    "${CG_TOOL_ROOT}/include"
    "${TCP3D_INSTALL_PATH}"
    "${EDMA3_INSTALL_PATH}"
    "${TCP3D_INSTALL_PATH}/ti/drv/tcp3d/test/src"

    2. Add this to Predefined Symbols

    USE_TCP3D_DRIVER_TYPES

    In pdk_6670_1_0_0_17, the 2 settings above have ben set correctly by default

    3. Add 2 libraries below in tcp3d_example_main.c

    #include <ti/csl/csl_psc.h>
    #include <ti/csl/csl_pscAux.h>

    4. Don't forget to change the content of enable_tcp3d() as mentioned in the post before

    5. Sometimes sintaks "#ifndef SIMULATOR_SUPPORT" doesn't work correctly, so if the program is executed to EVM, its better to remove the "#ifndef SIMULATOR_SUPPORT", "#else", and "#endif" in evable_tcp3d(), to ensure  procedure enable_tcp3d() is run by the program

    By doing all of that, the project tcp3d_example can be executed well.

    Thanks  a lot for the answer, and I hope the examples in MCSDK is always checked carefully