Columnists
Choose your watchdog timer with reliability in mind
By Bonnie Baker -- EDN, 9/1/2005
Embedded-system applications use WDTs (watchdog timers) to identify error conditions that cause the controller or processor to default into an erroneous state. Stand-alone WDTs used to be quite popular. For a short time, they were more reliable than their counterpart, which was the internal WDT in the controller or processor. With the controller or processor option, if the processor failed to execute in a timely manner, the WDT would surely have problems, as well. But, the stand-alone WDT fell short with its lack of an adjustable clock—allowing the user to change the setting of this timer independently of the system clock. The stand-alone WDT was missing features, such as minimum and maximum trigger times. With multiple triggers built into the WDT, you can catch situations in which the application system is running too slow or too fast.
Once again, the integrated-controller option has effectively assimilated the stand-alone option and gained some sophistication in the process. Today, the design of integrated WDTs is a separate function on the same chip. The clock on today's controller WDT is many times separate and usually set to an independent clock, such as an on-chip, RC time constant. With this configuration, the WDT clock is essentially isolated from the controller's system clock or oscillator. This fact alone could point you toward using the integrated-WDT option for your application.
These integrated devices also provide the flexibility of programming the number of counts in the WDT counter with a ratio of 1-to-16,384 or more to program the counter for ranges of milliseconds to several seconds. Controller and processor manufacturers call this function the WDT prescaler. With this generation of microcontroller WDTs, you can also program two or more triggers in the software. These triggers can catch erroneous code in noisy environments. The microcontroller WDT also continues to operate independently of the controller's sleep and idle modes. Other features, such as a double reset code, reduce the probability of false WDT resets in noisy environments.
So, does the stand-alone WDT provide functions that the integrated version does not? Essentially, the stand-alone WDT has also evolved from having the integrated WDT's simple, primitive function to a more sophisticated version. The functions of the stand-alone unit now include all of the features of the controller/processor version, except for on-the-fly programmability and double-reset-code capability. Some stand-alone WDTs also feature manual-reset pins to implement pushbuttons for the user. But you can easily implement this function with controller or processor interrupts or other designated controller pins, such as a master clear.
Both the integrated and the stand-alone options offer the possibility of EM (electromagnetic) interference or static discharge. If your layout is sensitive, the stand-alone WDT may be more susceptible to these disturbances, particularly if the alternative controller or processor WDT has double coding for the WDT reset. One issue may erroneously point you to a stand-alone version over the integrated microcontroller and microprocessor. When safety is critical, using an independent clock source may be preferable. For certain equipment, regulatory agencies recommend the use of independent WDTs. The controller-integrated-isolated version, as well as the stand-alone chip, effectively fit this bill. Additionally, many designers prefer the benefit of the other controller's power-control features, such as power-on reset or brownout reset.
The decision to use an integrated WDT or stand-alone WDT could go either way, depending on your application. But the truth about WDT challenges does not stop at hardware selection. The software plays an equal or larger role in ensuring that your system is robust and reliable on the way off the manufacturing floor. In your software, you can effectively program your WDT characteristics to fit the specifics of your application.
| Author Information |
|
|















Bonnie Baker is the author of A Baker's Dozen: Real Analog
Solutions for Digital Designers
. You can reach her at
