Check if FreeRTOS tasks are still running

Hello,

i created a project using freeRTOS. I´m currently searching for a option, how to check that my freeRTOS tasks are still running. I first thought about using a Watchdog, but somehow that doesnt work. Some users talked about creating a check task, that checks that the other tasks are still running (for example by checking counters that are incremented within the tasks). But i can´t figure out, how to properly implement that. Does anybody know how that works or has a code example?

Many thanks

The freeRTOS kernel knows about the state of every task. This were the first instance to ask. From outside it's near impossible to distinguish a terminated task from a task waiting (forever?) for some event.

Just 'ask' freeRTOS if a task is still running, FreeRTOS API categories

thank you very much. Is there a option how i could say to the program "if that task (contineously running task) doesnt reach that point after 5 seconds, do a restart" ?

I've got an ESp32 running freeRTOS that has been running for 3.2 years. Tasks do not fail, when properly written.

I'd say what you can program is dependent upon your skills.

Hi @kanstile

There are a number of FreeRTOS functions that can return a task's or tasks' current state.

There's the eTaskGetState(), vTaskGetTaskInfo() or uxTaskGetSystemState() functions. There's also vTaskList() for debug purposes.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.