Tool/software: Code Composer Studio
Hi ,
I would like to find out how I use task_create to create task in suspend/stop state and programmatically put newly created task in run mode.
Thanks
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.
Tool/software: Code Composer Studio
Hi ,
I would like to find out how I use task_create to create task in suspend/stop state and programmatically put newly created task in run mode.
Thanks
Hi Sergey,
To create the task without having it ready to run, you can give it a priority of -1. For example:
Task_Params taskParams;
Task_Params_init(&taskParams);
taskParams.priority = -1;
task = Task_create(..., &taskParams, ...);
The priority of -1 puts the task in the inactive state. Then to allow the task to run, change the priority to a value greater than 0 and less than Task_numPriorities.
Task_setPri(task, priority);
Best regards,
Janet