The main function of this watchdog timer is to detect code runaway and generate a reset if this occurs. The watchdog is set up by the Option Byte, so there is no way to affect the behavior of the watchdog timer from the application code. The Option Byte is set by constants located in the FLASH memory. Using this option byte, the watchdog timer interval can be selected and the watchdog timer can be disabled or enabled. Overflow size, or time, and window size can be selected. If the window is not selected then it operates as a standard watchdog. And as a last option one can select the window watchdog timer operation in halt or stop mode. Here it is possible to run the watchdog timer from the internal low-speed oscillator, even in stop mode, while the rest of the system is in sleep mode. This is often a requirement for security applications. To re-trigger the watchdog timer the whole WDTE register is used, by writing the “magic word” 0xAC to clear the watchdog timer and start counting again.