#definewdt_enable(timeout)
Enable the watchdog timer, configuring it for expiry after timeout (which is a combination of the WDP0
through WDP2 bits to write into the WDTCR register; For those devices that have a WDTCSR register, it
uses the combination of the WDP0 through WDP3 bits).
See also the symbolic constants WDTO_15MS et al.
#definewdt_reset()__asm____volatile__('wdr')
Reset the watchdog timer. When the watchdog timer is enabled, a call to this instruction is required
before the timer expires, otherwise a watchdog-initiated device reset will occur.
#defineWDTO_120MS3
See WDTO_15MS
#defineWDTO_15MS0
Symbolic constants for the watchdog timeout. Since the watchdog timer is based on a free-running RC
oscillator, the times are approximate only and apply to a supply voltage of 5 V. At lower supply
voltages, the times will increase. For older devices, the times will be as large as three times when
operating at Vcc = 3 V, while the newer devices (e. g. ATmega128, ATmega8) only experience a negligible
change.
Possible timeout values are: 15 ms, 30 ms, 60 ms, 120 ms, 250 ms, 500 ms, 1 s, 2 s. (Some devices also
allow for 4 s and 8 s.) Symbolic constants are formed by the prefix WDTO_, followed by the time.
Example that would select a watchdog timer expiry of approximately 500 ms:
wdt_enable(WDTO_500MS);
#defineWDTO_1S6
See WDTO_15MS
#defineWDTO_250MS4
See WDTO_15MS
#defineWDTO_2S7
See WDTO_15MS
#defineWDTO_30MS1
See WDTO_15MS
#defineWDTO_4S8
See WDTO_15MS Note: This is only available on the ATtiny2313, ATtiny24, ATtiny44, ATtiny84, ATtiny84A,
ATtiny25, ATtiny45, ATtiny85, ATtiny261, ATtiny461, ATtiny861, ATmega48*, ATmega88*, ATmega168*,
ATmega328*, ATmega164P, ATmega324P, ATmega324PB, ATmega644P, ATmega644, ATmega640, ATmega1280,
ATmega1281, ATmega2560, ATmega2561, ATmega8HVA, ATmega16HVA, ATmega32HVB, ATmega406, ATmega1284P,
AT90PWM1, AT90PWM2, AT90PWM2B, AT90PWM3, AT90PWM3B, AT90PWM216, AT90PWM316, AT90PWM81, AT90PWM161,
AT90USB82, AT90USB162, AT90USB646, AT90USB647, AT90USB1286, AT90USB1287, ATtiny48, ATtiny88.
Note: This value does not match the bit pattern of the respective control register. It is solely meant to
be used together with wdt_enable().
#defineWDTO_500MS5
See WDTO_15MS
#defineWDTO_60MS2
See WDTO_15MS
#defineWDTO_8S9
See WDTO_15MS Note: This is only available on the ATtiny2313, ATtiny24, ATtiny44, ATtiny84, ATtiny84A,
ATtiny25, ATtiny45, ATtiny85, ATtiny261, ATtiny461, ATtiny861, ATmega48*, ATmega88*, ATmega168*,
ATmega328*, ATmega164P, ATmega324P, ATmega324PB, ATmega644P, ATmega644, ATmega640, ATmega1280,
ATmega1281, ATmega2560, ATmega2561, ATmega8HVA, ATmega16HVA, ATmega32HVB, ATmega406, ATmega1284P,
ATmega2564RFR2, ATmega256RFR2, ATmega1284RFR2, ATmega128RFR2, ATmega644RFR2, ATmega64RFR2 AT90PWM1,
AT90PWM2, AT90PWM2B, AT90PWM3, AT90PWM3B, AT90PWM216, AT90PWM316, AT90PWM81, AT90PWM161, AT90USB82,
AT90USB162, AT90USB646, AT90USB647, AT90USB1286, AT90USB1287, ATtiny48, ATtiny88, ATxmega16a4u,
ATxmega32a4u, ATxmega16c4, ATxmega32c4, ATxmega128c3, ATxmega192c3, ATxmega256c3.
Note: This value does not match the bit pattern of the respective control register. It is solely meant to
be used together with wdt_enable().