watchdog solution for system hang?

nobody wrote on Tuesday, January 09, 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?

nobody wrote on Tuesday, January 09, 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.


imajeff wrote on Wednesday, 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.