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.

RTOS/CC2640R2F: Always call the main task

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640

Tool/software: TI-RTOS

Hello,

I am using CC2640 with ccsv7. My application has two tasks  (main task + idle task). I wont to have only my main task info ( call stack...etc), for that I used this API: Task_stat(Task_self(), &statbuf);

The issue that when I call Task_sleep(), I will switch from the main to idle task and Task_self() will call the idle task, hence I will get the data of the latter. Is there a way to get always the info of my main task?

Regards,

  • Instead of using Task_self(), you could save the Task_Handle returned when you created the main task and use that Task_Handle. This way you could check the stat of your specific task rather than the current task that's running.