Quality RTOS & Embedded Software

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


watchdog solution for system hang?

Posted by Nobody/Anonymous on January 9, 2007

Hi there,

Is it possible that FreeRTOS will hang if something is wrong in the application code (only applicatin tasks are faulty and the kernel code remain untouched)?

Can I use watchdog to make sure the system resets in a hang condition?

The str91x port of freertos uses watchdog as tick interrupt. What else can I use on this port to get a watchdog like functionality?

RE: watchdog solution for system hang?

Posted by Nobody/Anonymous on January 9, 2007
Without a MMU then the application can corrupt data within FreeRTOS making it crash. If the kernel code really is untouched then a badly written task could starve out all other lower priority tasks from running, or leave interrupts disabled.

I don't know the STR91x but suspect it will contain two or three different timers, any of which can be used in place of the watchdog interrupt.


RE: watchdog solution for system hang?

Posted by Jeff Smith on January 10, 2007
Trust me... it is much easier to make it hang than to make it work :) My biggest problem so far is stack overflows. Since each task has a stack, naturally I make them smaller to fit more, yet still give enough space in each.

Once you get the 'hang' of it, you'll appreciate how much you can do with the versatility. Having no MMU allowes very small processors to do alot, and still use any of it's hardware including watchdog.

Be careful placing the COP (watchdog timer) reset because you could end up with only that thread running, so it never times out yet all other threads are crashed. A good practice would be have all critical tasks report to a single task which monitors them and resets the COP if working.

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

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.


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


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