2012-09-27 06:25 AM
What is the best way to implement a watch dog timer in my program?
How many different types of watchdogs are there? Which is best to use?2012-09-27 07:25 AM
That depends on what the dog is watching. Is it an external analog or discrete signal, an internal data value, or an elapsed time, or ........?
Cheers, Hal2012-09-27 07:55 AM
Most likely just a program tick/timer/heartbeat.
2012-09-27 08:13 AM
You have the IWDG and WWDG.
You generally don't want to kick them under interrupt. If you have multiple tasks, you could use a score-board variable which each task tickles, and then have the idle task check that periodically, and kick the HW watchdog.2012-10-01 06:01 AM
Ok, I will use the WWDG.
Looking for some clarification on the Prescaler and Window Value functions. For SetPrescaler, the WWDG counter clock is based off of PCLK1. Which one of these for are typically used. I was going to kick the dog inside my 10 ms timer increment code. Does this determine which of the four I end up using? For the set window function, it says it must be set lower the 0x80. So I set this at 0x79 so I wont have problems?