

The following guide applies to the whole ATmega 48 / 88 / 168 / 328 / 328P family. save the status of the program so that it continues its work at the right step after the reset (simple example: control of a washing machine).save parameters on an EEPROM for error analysis.ensure safe conditions for the controlled system.More precisely, the watchdog timer is an automatic counter that triggers the mentioned actions when it reaches its limit, if it is not reset before.įor example, an interrupt before the reset can be used to If these are omitted, depending on the setting and microcontroller, a reset is performed after an adjustable time, an interrupt is triggered or both. Simply put, the watchdog timer watches over the sketch by regularly expecting signs of life from it. Also, errors in peripherals, such as communication lines or sensors, can cause the sketch to hang in a program loop.

Most of the time, programming errors become immediately noticeable, but sometimes this happens later under special conditions that were not considered during programming.
#Esp8266 wdt as timer Pc#
Under certain conditions, a microcontroller can hang up just like a PC due to unexpected conditions or programming errors. Watchdog with system reset and interrupt.The watchdog timer of the Arduino UNO (and other AVR MCUs).What is a watchdog timer and why do I need it?.After my articles about the 8-bit timers and the 16-bit timer of the Arduino UNO or the ATmega328P I would like to complete this topic with the watchdog timer.
