Atmega bricked by watchdog
While programming a micro controller for the home automation over IP project there’s a lot of trial and error involved. To make it possible to reboot the micro controller remotely by software I was experimenting with an infinite loop without resetting the watchdog timer.
Include the Atmega watchdog functions:
Enable the watchdog timer:
Super loop:
wdt_reset();
…do some stuff…
}
Restart the microcontroller:
This an easy and effective way to reset the controller.
Unfortunately the tcp/ip stack has some internal loops that keep the system busy when the network cable is disconnected. Because the watchdog timer is only reseted at the beginning of the super loop the watchdog flows over, again and again. When the micro controller boots the settings are read/written from and to the eeprom. With a maximum of 100.000 write cycles for eeprom leaving it powered for a whole day wasn’t a good move. Time to order a new micro controller, again some learning money spend ![]()












0 Comments on “Atmega bricked by watchdog”
Leave a Comment