What is a watchdog timer?

Publisher:Xiaohan521Latest update time:2013-04-07 Source: 21icKeywords:Watchdog Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The Watchdog Timer (WDT) is a component of the microcontroller and plays an important role in the debugging and running of the microcontroller program. Its main function is to reset the microcontroller by resetting the device (if the software does not clear the device) when a software failure occurs. It can also be used to wake up the device from sleep or idle mode.

Working Principle of Watchdog Timer

When enabled, the WDT will increment until it overflows, or “times out.” A WDT time-out forces a device Reset, unless the device is in Sleep or Idle mode. To avoid a WDT time-out Reset, the user must periodically clear the Watchdog Timer using the PWRSAV or CLRWDT instructions. If the WDT times out during Sleep or Idle mode, the device wakes up and continues code execution from the point where the PWRSAV instruction was executed. In both cases, the WDTO bit (RCON<4>) is set, indicating that the device Reset or wake-up event was caused by a WDT time-out. If the WDT wakes the CPU from Sleep or Idle mode, the Sleep status bit (RCON<3>) or Idle status bit (RCON<2>) is also set, indicating that the device was previously in a power-saving mode.

Watchdog timer function

The watchdog timer (WDT) is a component of the microcontroller and is important in the debugging and running of the microcontroller program. Its main function is to reset the microcontroller by resetting the device (if the software does not clear the device) when a software failure occurs. It can also be used to reset the device from sleep or idle mode. The watchdog timer provides an independent protection system for the microcontroller. When the system fails, after the optional timeout period, the watchdog will respond with a RESET signal. For example, the x25045 has three optional timeout periods of 1.4 seconds, 600 milliseconds, and 200 milliseconds. When your program crashes, the x25045 will reset the microcontroller.

Most watchdog timer ICs generate a single, limited output pulse of limited duration when the watchdog times out. This is suitable for triggering a reset or interrupting a microprocessor, but some applications require a latched output (fault indicator).

Considering safety issues, automotive electronic systems need monitoring circuits to monitor fault tolerance or safety. The watchdog timer is an ideal way to meet such requirements. It detects the failure status of the circuit or ?C by detecting the periodic pulses generated by the microcontroller under normal working conditions. Once a failure occurs, it can immediately switch to the backup/redundant system. > Operation of the watchdog timer

During normal operation, a WDT time-out will generate a device reset. If the device is in sleep mode, a WDT time-out will wake up the device and continue normal operation (called WDT wake-up). Clearing the WDTE bit to 0 will permanently disable the WDT.

The postscaler assignment is completely software controlled, meaning it can be changed at any time during program execution.

To avoid an unpredictable device Reset, the following instruction sequence must be executed when changing from the Timer0 prescaler assignment to the WDT postscaler assignment. This instruction sequence must be executed even if the WDT is disabled.

Keywords:Watchdog Reference address:What is a watchdog timer?

Previous article:A comprehensive review of MSP430 MCU watchdog
Next article:Application of watchdog circuit

Recommended ReadingLatest update time:2024-11-17 10:47

C51中断(void timer1(void) interrupt 3 using 3)
interrupt indicates the interrupt priority, and using indicates the working register group used. interrupt x using y        The xx value after interrupt is the interrupt number, that is, which interrupt port this function corresponds to. Generally in 51,        0 is external interrupt 0          1 is timer 0        2
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号