How to use the watchdog timer in a RTOS?
Posted
by
user946230
on Stack Overflow
See other posts from Stack Overflow
or by user946230
Published on 2012-11-04T11:02:36Z
Indexed on
2012/11/04
17:01 UTC
Read the original article
Hit count: 159
Assume I have a cooperative scheduler in an embedded environment. I have many processes running. I want to utilize the watchdog timer so that I can detect when a process has stopped behaving for any reason and reset the processor.
In simpler applications with no RTOS I would always touch the watchdog from the main loop and this was always adequate. However, here, there are many processes that could potentially hang. What is a clean method to touch the watchdog timer periodically while ensuring that each process is in good health?
I was thinking that I could provide a callback function to each process so that it could let another function, which oversees all, know it is still alive. The callback would pass a parameter which would be the tasks unique id so the overseer could determine who was calling back.
© Stack Overflow or respective owner