Watchdog In Industrial Computer

- Jan 18, 2020-

Definition: In a microcomputer system composed of a single-chip microcomputer, the work of the single-chip microcomputer is often disturbed by external electromagnetic fields, causing data confusion in various registers and memory, which will lead to program pointer errors, not in the program area, and take out incorrect program instructions. And so on, will fall into an endless loop, the normal operation of the program is interrupted, the system controlled by the single-chip microcomputer can not continue to work normally, it will cause the entire system to fall into a stagnation state, and unpredictable consequences will occur.


The watchdog timer is a piece of hardware that is usually built into a single board computer (SBC) or embedded PC and can cause a reset when it determines that the system has hung or is no longer executing the correct code sequence.

A well-designed watchdog mechanism should at least capture events that suspend the system. In an electrically noisy environment, a power failure can corrupt data in the program counter, stack pointer, or RAM. The software may crash even if the code is completely error-free. This is exactly the kind of short-term failure that regulators will catch.

Errors in the software can cause the system to hang, so it is best to fix the root cause rather than relying on the watchdog timer. In complex embedded systems, there may be no guarantee of errors, but by using a monitor, you can prevent these errors from hanging the system indefinitely.

From a simple text definition, most watchdogs are a timer composed of hardware, and there are software-controlled timers for watchdogs. The function of the watchdog is that when the program is running, the program cannot clear the watchdog to 0, so the watchdog will overflow soon after the program runs, and generate a reset signal to the MCU to return the program to the starting point.