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.

TSK called from PRD in DSP/BIOS

Hello everyone, I want to activate a TSK_function in PRD function , how to do it?

The problem is that I want to call TSK_function after PRD run 10 times, I want to know if there is a API function such as SWI_post in TSK module ?

I want to realize the following codes:

void myprd()

 {

     int i;

    if(i>9)

   {

     i=0;

     //SWI_post(&SWI0); //call SWI_function()

     // if I want to call TSK_function instead of SWI_function, how to do it? Which API function of TSK module can I use?

   }

  return;

}

Is it ok to do it like this? If not, how can I cause TSK to be activated from PRD?

Regards

lex

  • Lex,

    Yes, you can activate a task from a PRD function.  For example, by posting a semaphore, which the task has done a SEM_pend() upon. 

    The “slice” example provided with DSP/BIOS illustrates this: in the TSK1 task a SEM_pend() call will block the task execution until PRD1 posts the semaphore. 

    The examples are located in the packages\ti\bios\examples subdirectory of the BIOS install.  For example: C:\Program Files\Texas Instruments\bios_5_41_10_36\packages\ti\bios\examples. 

    Regards,
    Scott