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.

How to detect TCP3D driver 's Pause state ?

Other Parts Discussed in Thread: TMS320C6670

Hi,

I've run pdk_C6670_1_0_0_20\packages\ti\drv\tcp3dExampleProjects on TMS320C6670. The driver's pause state detection has to be realized by running start function all the time in a while(1) loop , which costs the core much time.How can I avoid doing so.

Can the TCP3D generates a signal itself when it runs into Pause state so that I can only call start function at that time ?

while ( 1 )  // at Line 745 in tcp3d_example_main.c 

    {

        /* Pending on Semaphore to run the loop */

        Semaphore_pend(semSendWait, BIOS_WAIT_FOREVER);

 

        /* Received both the completion events, so exit send task */

        if ( tcp3dEventCntr >= 2 ) 

        {

            break;

        } else if ( tcp3dEventCntr == 1 )

        {

            /* one code block test case */

            if ( codeBlockSet.maxNumCB == 1 )

            {

                break;

            }

            else if ( codeBlockSet.mode == TEST_MODE_SPLIT )

            {

        ................

            }

        }

 

        if ( TCP3D_DRV_NO_ERR != Tcp3d_start(inst, TCP3D_DRV_START_AUTO) )

        {

            System_printf("Tcp3d_start function returned error\n");

            System_exit(0);

        }

 

        /* keep trying until finding two end events */

        Semaphore_post(semSendWait);

 

        pendPauseCntr++;

    }

 

    /* Last code block decoded - Start the receive task */

    total_clock_end = TSCL;

    Semaphore_post(semRcvStart);

}

  • Hi Muhua,

    TCP3d driver automatically detects the PAUSE state inside the enqueue function if there are more blocks being enqueued or else the application has to do the checking while waiting for the last code block to be decoded.

    So the above code is only valid for the last Code Block since there are no more CBs in the queue after that.

    Regards,

    Arun

  • Hi Arun,

    Can an interrupt be generated automatically when the driver runs into the PAUSE state ?It takes too much  time for using a  while loop to wait  for the last block to be decoded.I think this approach is not good enough.Any suggestion?

    Thanks a lot.

    Regards,

    Muhua