FreeRTOS Support Archive

The FreeRTOS support forum can be used for active support both from Amazon Web Services
and the community. In return for using our software for
free, we request you play fair and do your bit to help others! Sign up
to receive notifications of new support topics then help where you can.

This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.

Is xHandle the same variable? A task handle can only reference one task at a time. It will reference the first task created after the first call to xTaskCreate(), but then that reference will be lost and it will instead reference the second task created after the second call to xTaskCreate.

Then, after the first call to vTaskDelete() xHandle will not reference any valid task (the task it did reference is not deleted), so the second call to vTaskDelete() will be invalid.

RE: FreeRTOS base Question (stm32f HID/VCP)

Just need to confirm test task. I want to know test task imformation whether live or die. I want to know test task imformation whether working or not working.

You can also code the task to monitor itself, if you want continuous monitoring. -> This answer is good. but, need to more detail imformation. I don't know to use what FreeRTOS API function for monitor itself.

please, one more,

RE: FreeRTOS base Question (stm32f HID/VCP)

Most of the standard FreeRTOS demos use a set of common tasks that monitor themselves and update a counter if they are running correctly. A check task then monitors all the counters to ensure that all the tasks are running as expected. This is just one way of doing it though.

The best way of doing it depends on what your task is doing. For example...if the task is supposed to run every second, then have the task read the time each time it executes so the task knows if it is running at the correct rate or not. If it detects that it is running at the correct rate it can communicate the error to whatever is monitoring the system. You can also use the hardware watchdog by having the task kick the watchdog if it is running and running correctly, and have it not kick the watchdog if it is not running or running incorrectly.

Regards.

RE: FreeRTOS base Question (stm32f HID/VCP)

One thing I do to check if tasks are running is I have each task I care about set a bit in my global FLAGS variable. Periodically (slowly) I run a Housekeeping task and one of the things it does is check the flags (easy to do with a bit mask). If all is well it clears the flags and continues. Otherwise it skips touching the watchdog timer so the system will reset.

Note that on setting and clearing flag bits in a global FLAGS variable I have two short functions that enter critical task while doing the change to prevent being swapped out in mid-change and messing up the global FLAGS.

FlagSet(bit_mask); // OR in the bitFlagClear(bit_mask); // AND out the bit