Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists