daviddigo
-
Content Count
7 -
Joined
-
Last visited
Reputation Activity
-
daviddigo reacted to zeke in Watch Dog timer
I don't know Energia so this question might sound out of place.
The most ideal and desirable watchdog device is a hardware based solution. That being said, why not use software timers instead?
I use state machines in C to manage many repetitive tasks. Some of those tasks implement a software watchdog.
One state is to increment the timer count. Another state is to check that value. If that value is below the threshold (ie: 1 second [x counts]) then carry on to run state. If that value is above the threshold then force the MSP430 to reboot by sending it to the reboot state.
This method is not absolutely foolproof since it is completely dependent on the fitness of the hardware. But it works well when the hardware is working flawlessly.
If Energia can do state machines then you could implement this method.
-
daviddigo reacted to cde in Watch Dog timer
Three ways. Use an external Watchdog Timer ic. Create a passive or simple watchdog timer from a 555 ic (google "watchdog 555" or "555 watchdog"). Or if you have a msp430 ic to spare (you should, the launchpad comes with two), create a watchdog timer with it.
In all three cases, you would need to drop a few digitalwrites (high and low) into your code, on a spare pin.