Datasheet
15.8 Watchdog Timer
If the watchdog timer is not needed in the application, the module should be turned OFF. If the watchdog
timer is enabled, it will be enabled in all sleep modes and hence always consume power. In the deeper
sleep modes, this will contribute significantly to the total current consumption.
Refer to 15.6 Watchdog System Reset for details on how to configure the watchdog timer.
15.8.1 Features
• Clocked from Separate On-chip Oscillator
• Three Operating modes:
– Interrupt
– System Reset
– Interrupt and System Reset
• Selectable Time-out Period from 16 ms to 8s
• Possible Hardware Fuse Watchdog Always ON (WDTON) for Fail-safe mode
15.8.2 Overview
The device has an Enhanced Watchdog Timer (WDT). The WDT is a timer counting cycles of a separate
on-chip 128 kHz oscillator. The WDT gives an interrupt or a system reset when the counter reaches a
given time-out value. In normal operation mode, it is required that the system uses the Watchdog Timer
Reset (WDR) instruction to restart the counter before the time-out value is reached. If the system doesn't
restart the counter, an interrupt or system reset will be issued.
Figure 15-7. Watchdog Timer
OSC/2K
OSC/4K
OSC/8K
OSC/16K
OSC/32K
OSC/64K
OSC/128K
OSC/256K
OSC/512K
OSC/1024K
WDP[3:0]
WATCHDOG
RESET
WDE
WDIF
WDIE
MCU RESET
INTERRUPT
128 kHz
OSCILLATOR
In Interrupt mode, the WDT gives an interrupt when the timer expires. This interrupt can be used to wake
the device from Sleep modes, and as a general system timer. One example is to limit the maximum time
allowed for certain operations, giving an interrupt when the operation has run longer than expected. In
System Reset mode, the WDT gives a reset when the timer expires. This is typically used to prevent
system hang-up in case of runaway code. The third mode, Interrupt and System Reset mode, combines
the other two modes by first giving an interrupt and then switch to System Reset mode. This mode will for
instance allow a safe shutdown by saving critical parameters before a system Reset.
ATmega48PA/88PA/168PA
System Control and Reset
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40002011A-page 82