FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! 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.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [December 2012 Threads] freertos dogPosted by cui_632 on December 26, 2012 Hi:
is there a way to monitor task dead ? my aim is to reset system once finding one task is dead (never calll vtaskdelay function).
RE: freertos dogPosted by Dave on December 26, 2012 There are lots of different ways of doing that. For example, all the standard demos have a check task that monitors the other tasks to see if they are still running. You can have the check task kick a hardware watchdog.
RE: freertos dogPosted by cui_632 on December 28, 2012 if the check task is dead, what happen
RE: freertos dogPosted by Richard on December 28, 2012 In any embedded system you have to consider what to do when something goes wrong. The only difference in a multitasking system is how to detect when something has gone wrong.
In a single threaded system, if something goes wrong in that thread, you do "something" to correct it. The easiest "something" to do is reset the system, and a hardware watchdog is the most common method of doing that (when resetting is acceptable to the application). When the system is in an error state stop kicking the watchdog.
In a multitasking system the principals are the same, except you have to look at multiple tasks to know if something has gone wrong instead of a single task. There are several ways you can do that, as already mentioned, but the "something" you do to correct it can still be resetting the system in exactly the same way as for a single threaded system. You also have other alternatives, for example deleting then restarting just the task showing an error.
The check task is a simple way of monitoring other tasks, and if the check task is the task kicking the watchdog, and something goes wrong with the check task, then the watchdog will not get kicked and the system will reset automatically. You can use other techniques to - for example have a software timer per critical task and have the task keep resetting the software timer so it never expires. If a software timer expires then you can assume something is wrong in the task and have that reset the task or the whole system as appropriate.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|