Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

freertos dog

Posted 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 dog

Posted 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 dog

Posted by cui_632 on December 28, 2012
if the check task is dead, what happen

RE: freertos dog

Posted 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.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner