Part Number: MSP432P401R
Tool/software: TI-RTOS
Hi,
I need help in setting task priorities dynamically. I am using release.cfg to define my tasks. I need to know what to pass to Task_setPrio API. Where can I get the task handle?
Thanks,
Jeffrey
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.
Part Number: MSP432P401R
Tool/software: TI-RTOS
Hi,
I need help in setting task priorities dynamically. I am using release.cfg to define my tasks. I need to know what to pass to Task_setPrio API. Where can I get the task handle?
Thanks,
Jeffrey
If your .cfg file stores the created task handle in the Program.global Global Namespace:Jeffrey Lomibao76 said:I am using release.cfg to define my tasks. I need to know what to pass to Task_setPrio API. Where can I get the task handle
/* Create a Task Instance and use default Instance parameters */
Program.global.task1 = Task.create('&task1Fxn');
Then the task handle is created as global variable named task1 obtained via the <xdc/cfg/global.h> include file which can accessed in the C code. E.g.:
#include <xdc/cfg/global.h>
Int main()
{
int task_pri;
task_pri = Task_getPri (task1);
task_pri++;
Task_setPri (task1, task_pri);
...
See the 2.3.10 Accessing the Global Namespace section in the SYS/BIOS (TI-RTOS Kernel) User's Guide for more information.
The document you referenced is the TI-RTOS 2.20 User’s Guide. It contains a link to the SYS/BIOS User’s Guide (SPRUEX3) which has the section 2.3.10 Accessing the Global Namespace.Jeffrey Lomibao76 said:I could not find section 2.3.10. Is this the right user guide?
www.ti.com/.../spruhd4m.pdf
Where TI-RTOS is built on top of SYS/BIOS.
**Attention** This is a public forum