O'Reilly logo

Professional Windows® Embedded Compact 7 by Thierry Joubert, David Jones, Samuel Phung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

WATCHDOG TIMER

A Watchdog Timer (WDT) is a timer that triggers a system reset or some other system resolution event when it times out. Software on the device needs to signal the timer to restart its count regularly to avoid the timeout action. This is often called “petting the dog.” The purpose of a watchdog timer, also called computer operating properly (COP), is to restart the system when it has become errant. If the device hangs for whatever reason, the timer automatically resets the system or signals a handler to take a corrective action. That way, after a maximum period, the system always restores to a normal state if errant. Many microprocessors, many Systems on a Chip (SoC), and some System I/O chips have an inbuilt watchdog timer, although this function can also be implemented in software. A hardware watchdog timer is a better option because no matter what state the system software is in, the hardware can always force a reset if required. Windows Embedded Compact 7 has support for a software watchdog, although it can be configured to use a hardware watchdog if available.

When you configure a watchdog timer, you need to configure two properties besides enabling or disabling it. You configure the watchdog timer timeout and what to do when it does time out.

Some possible timeout actions are:

  • System reset
  • An interrupt
  • Operating system event
  • Kill the process that started the WDT
  • No action

The purpose of the WDT determines what action should be taken. A system reset should ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required