I’ve been trying to use the ATMEL internal watchdog on my Hydra with no luck.
The problem is that the watchdog Mode Register can be written only once after the cpu is reset, and the tinybooter code writes it … to disable it.
If the wd register is not written, the hydra will reboot after 16 seconds, unless you do something.
So here I am sharing my options:
1 - Recompile tinybooter (how?) and comment out the “disable watchdog” line: My managed code will have 16 seconds to reprogram the watchdog and start a timer with a WD reset routine.
2 - Recompile tinybooter and add a fixed native IRQ based timer routine somewhere on the “operating system” to reset the timer. This is hard,and the WD time will be fixed to 16 seconds.
3 - Recompile tinybooter and set the watchdog action to trigger an IRQ, make the IRQ handler code mutable/parameter dependant to make it reboot. This is hard, and it won’t be a real watchdog.
4 - Use a poor man’s watchdog (ie. timer based) written on managed code. Miles away from a real watchdog.
5 - Add a hardware watchdog circuit, I guess it can be I2C and make it drive the reset pin of the ATMEL.
Ideas / Opinions?