A watchdog timer (WDT) is a hardware-based timer that monitors the operation of an MCU program. It performs a reset when the program fails or runs out of control due to errors, malfunctions, or other issues. This reset allows the MCU to start again from scratch and continue its operations without any disruptions.   The WDT has two components: a counter and an interrupt service routine (ISR). The counter counts down from an initial value in regular intervals, while the ISR resets the counter back to its starting value whenever it reaches zero. If the program running on the MCU fails or gets stuck before reaching the ISR, then the counter will reach zero and trigger a reset of the entire system.   The WDT works by monitoring how long it takes for certain processes to run on your MCU. If there are any errors that cause your program to get stuck or run out of control, then these processes will take longer than normal to complete their tasks. When this happens, the WDT’s counter will continue counting down until it reaches zero without ever being reset by an ISR call. When this happens, a reset signal is sent, which restarts your whole system from scratch in order to avoid any further damage or disruption caused by faulty programming.