PCB Design Tips: Should You Include an External Watchdog Timer (WDT) in Your Board Design

Should You Include an External Watchdog Timer (WDT) in Your PCB Board Design?

It is important to have a good understanding of internal and external WDTs especially when it comes to making decisions on things like whether to include an external watchdog timer (WDT) into your board design, which can be a difficult choice especially your microcontroller (MCU) has a built-in WDT.

What is a WDT and why is it important for your electronic design?

A watchdog timer (WDT) is an electronics feature for detecting anomalies in embedded systems and resetting the microcontroller. A WDT has a pre-loaded timer which resets the microcontroller once the pre-loaded timer expires. The microcontroller consistently refreshes the timer setting to prevent it from resetting and has been referred to as “kicking the watchdog”.

Whatever you do to get your firmware and hardware to be the best, you will always run into problems like memory stack overflow, unstable power supply, or your program getting trapped in a perpetual loop leading to microcontrollers stall. Such errors can lead to a system crash which is a problem in applications with little or no tolerance for downtime. In the case of a crash, systems equipped with a WDT will reset automatically. WDTs is almost a priority in most designs, however, the question to be answered here is whether an external WDT should be incorporated in MCUs that come with an inbuilt or rely  principally on the internal WDT.

Internal WDT vs External WDT

It is important to understand the similarities before choosing one WDT over the other.

Internal WDTs

These are watchdog timers built within the microcontroller and configure and refresh the WDT by writing values to respective registers of the WDT.

External WDTs

These are physical integrated circuits (IC) which require passive components to function. The length of the reset countdown is determined by the value of the capacitor. External WDTs are reset by sending a voltage pulse and they reset the microcontroller the same way.

The main benefit of an internal WDT over an external WDT is cost saving eliminating costs on additional parts. Most modern MCUs are equipped with an internal WDT which are reliable.

However, since the internal WDT is part of the same IC as its MCU, would the WDT fail if the microcontroller failed?

The likelihood of an unreliable internal WDT is very minimal but they can fail from an erroneous code that mistakenly deactivates the timer, and an internal WDT sharing the same system clock with the microcontroller is highly likely to malfunction if the system clock fails.

It is safer to back up an internal WDT with an external one in mission-critical applications.  The cost of adding some components is less than the potential damage from a stalled system, especially for applications in the automotive industry, gas, medical and oil. At the end of the day, the choice of what to use rests with the designer you decide whether it will be internal only or both.