What Is Watchdog Timer, Working, Applications, Features Of Watchdog

what is watchdog timer

Hello guys, welcome back to my blog. In this article, I will discuss what is watchdog timer, applications, working of the watchdog timer, features of watch_dog timer, etc.

If you have any doubts related to electrical, electronics, and computer science, then ask questions. You can also catch me on Instagram – Chetan Shidling. 

Also, read:

What Is Watchdog Timer

A watchdog timer is an electronic timer that is used to detect and also recover the ECU processor from malfunctions. The watchdog timer is used for monitoring the firmware execution which is a hardware timer. This timer is commonly found in embedded systems and other controlled electronic equipment where humans cannot easily access the equipment or would be unable to react to faults in a timely manner.

Ex:- Aircraft, Automotive ECU’s, etc.

The timer module restarts the system if only in the situation of occurrence of a software problem. During normal operation, the system regularly restarts the watchdog timer to prevent it from timing out. If the system or Processor fails to restart the watchdog timer then the timer will generate a timeout signal. A watchdog timer can generate a reset when a timeout signal is reached.

The timer was to count to a threshold typically set by the program. For example, we come across just like we would think of a pet dog that guards our house. Look at another example that you are the king or queen of a country with a very rich treasure. I decided to put the treasure inside the castle to keep it safe, then how to make sure the treasure safely castle high regard, fortunately, the guard falls asleep someone could come in and take all the treasure. By using a watchdog to make sure that everything is going according to plan that the guard has instructed to keep telling the watchdog that everything is okay.

In this way, if the guard would fall asleep well the watchdog would know that something is wrong. It will guard your program and make sure that everything is OK within your embedded system. It is normally counting numbers like 0, 1, 2, 3 etcetera and the watchdog peripheral candle with everything. So, for this reason, it trusts a program that makes sure that everything is okay.

Eventually, the watchdog timer will count up to its threshold value that you specify your program indicating the watchdog timer purple waits too long program is headed. well, in this case, to washed out powerful mark and reset commands the microcontroller reset command will stop the controller and it attempts to start your program all over yet hopefully restarting a program will give you an embedded system which is a better chance to figure out what went wrong.

To reset the Electronic Control Unit(ECU) or Processor or system for recovering it from fault. The presence of a Watchdog timer makes the ECU or Processor or System continue to be idle and no external force can recover the issue rather than human interaction.

Working of Watchdog Timer

Generally, the Watchdog timer works with respect to the counter. The counter is the main impact that gives the counting values. There are 2 types of counters. They are

  1. Watchdog Counter
  2. Processor Counter

If the Processor is working fine, it will reset the watchdog timer counter. For example, the watchdog timer will give some oscilloscope counts. Once the waveform reaches a certain value then it will send a signal to reset the Processor. To make sure the ECU is working fine it will continuously reset the watchdog timer. The same process will continue to keep on working until the ECU or system is working fine.

If the ECU or system is not working fine then the signal from Processor cannot reset the watchdog_timer. At that time, the counter counts will increment then it will send the reset into the Processor. It provides automatic detection of malfunctions that prevent the computer from kicking it.

The controller has to restart the watchdog_timer every 5 seconds. If the controller fails to restart the watchdog timer in 5 seconds, then in the 6th second the watchdog timer will restart the controller. Generally, the controller hanging is due to low power.

Features of Watchdog timer:-

  1. 32 bit down counter with a programmable load register.
  2. Separate watchdog clock with an enable.
  3. Lock register protection from runaway software.
  4. Programmable interrupt generation logic with interrupt masking.
  5. Reset generation logic with an enable or disable.

It increments or decrements a free-running counter with each clock pulse and generates a reset signal on reaching a limit of 0.

Applications:-

  1. Watchdog_timer is used in mobile phone to display is off in case no GUI interaction takes place within a given watched time interval.
  2. Watchdog_timer is used in temperature controller to monitor if the controller takes no action to switch off the current within the preset watched time interval.
  3. It helps to reset the system automatically when there is a software hangs without using any human interactions.

I hope this article may help you all a lot. Thank you for reading.

Also, read:

About The Author

Share Now