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


FreeRTOS & watchdog

Posted by paolo ferrari on May 14, 2010
Using recently FreeRTOS and I need advice:
which is the best place to reset the watchdog?
- In idle task
- A task with lowest priority
- A task with highest priority
- Elsewhere

Any comments are welcome

RE: FreeRTOS & watchdog

Posted by MEdwards on May 14, 2010
It depends on what you want the watchdog to do. Normally you will kick the watchdog after performing a number of tests on the entire system, for example, are the correct number of tasks running, has each task executed the expected number of times, have any tasks failed to execute since the check was last performed, etc. This can be done from a task, but the tasks priority will depend on the rest of the application functionality.

RE: FreeRTOS & watchdog

Posted by Richard Damon on May 15, 2010
I generally put the watchdog monitor task near the bottom of the priority list (there may be some non-critical background operations below it). Placing it low adds a check for CPU starving by some other task, As Edwards says, it should check that all the critical tasks are still alive and functioning.

RE: FreeRTOS & watchdog

Posted by paolo ferrari on May 15, 2010
thanks guys for your answers

another question:

To my mistake or for any reason FreeRTOS crashes.
I want a hardware watchdog that in this case reset the system.
To reset this when everything is ok, the best place is a task of low or high priority?

Thanks again

RE: FreeRTOS & watchdog

Posted by Jack Peacock on May 17, 2010
In one app (ARM7) I set up a high priority task as a watchdog, triggered once per second from the RTC timer. The watchdog checks the pending messages in several application queues to make sure none are maxed out for several seconds, indicating a hung process. I also reset an external hardware watchdog at the same time.

For another design I put the independent watchdog (STM23) in the system tick hook routine, to guarantee the RTOS timer doesn't stop.
Jack Peacock

RE: FreeRTOS & watchdog

Posted by paolo ferrari on May 18, 2010
Thanks for your comments.
I think I found the right solution for my application.

Thanks again to all

RE: FreeRTOS & watchdog

Posted by jinx on May 28, 2010
Do these answers change for uCs with MPUs such as the Cortex M3?

For example, I assume the best place to put the watchdog functionality would be in a privileged task

[ 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