We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, My name is bharath i am studying a article on watchdog timers, i am in the middle of the article in that it is given as:: A properly designed watchdog mechanism should, at the very least, catch events that hang the system. In electrically noisy environments, a power glitch may corrupt the program counter, stack pointer, or data in RAM.
I was unable to follow what that power glitch is? and how it is going to corrupt the program counter,stack pointeror data in the RAM..... I have search the internet to know about it but i could not follow it properly.. I will be thankful to you people if you can give me some idea about that.
thanks in advance ..........
I was unable to follow what that power glitch is?
A dictionary can help you in this case.
dictionary.reference.com/.../glitch
A glitch is a very short deviation from the specified value.
and how it is going to corrupt the program counter,stack pointeror data in the RAM
If the power to a chip even briefly dips below the minimum specified value, it is very likely that the chip will enter an undefined state - i.e. any of the registers, RAM, etc may become corrupted.
A lot of bad things can happen if the power supply (or the voltage on signal pins) goes outside the specification.
A watchdog can fix some resulting lockup problems - i.e. when the software has gotten into an undefined state, and sometimes when the hardware has gotten into an undefined state.
However, it can't help if you get a latchup of processor signals. Then you need to remove the power, and wait for a while - and hope for the best.
Most of todays microcontrollers has a built-in watchdog, and since the cost of using it is noramlly so low, almost all embedded software should make use of a watchdog.
Most of todays microcontrollers has a built-in watchdog, and since the cost of using it is noramlly so low,
Actually, if I remember the article correctly, then one of the points the author attempts to make is that any kind of "built-in" watchdog will depend on at least parts of the processor to run correctly, which is something that a "proper" watchdog should never do. Therefore, "built-in" watchdogs do not deserve that name.
Have you ever walked on a carpet and then seen, heard and felt a spark when you have touched an element or similar?
Such a discharge can be many kV, and if you touch electronics, the jolt may kill it. But even if the jolt isn't strong enough to kill, it can be strong enough to make the processor "slip" and incorrectly process an instruction, or read the wrong contents from memory or similar. This should not be so strange, since the energy in the jolt is many times stronger than the energy transmitted when the transistors turns on or off. The small capacitances in digital chips are absolutely puny (and the industry is still fighting to make them smaller to allow lower power consumption and/or faster clock speeds).
I don't think there is much difference in reliability from a built-in or external watchdog, as long as the watchdog is correctly implemented. It should not be possible for the software to turn off it, once started. Preferably, it should be started from a programmable fuse, instead of from initialization code, to reduce the unprotected window.
It relies on the availability of a clock signal to see time - but that requirement is the same for an external watchdog.
It requires power for it's operation - but so does the processor, or an external watchdog.
The biggest problem with watchdogs isn't how they are implemented, but how they are used. A lot of software kicks the watchdog from a very large number of places. If the software gets stuck in an infinite loop somewhere, then it is quite likely that this loop also contains a watchdog kick.
It relies on the availability of a clock signal to see time
That's one of the things that makes a bad watchdog according to the article ... good ones don't.
When the oscillator on the processor is dead, you don't need an external watchdog. If it's broken, you need to service the board. If you have a latchup, the external watchdog are normally unable to isolate all voltages to let the latchup disengage.
A built-in watchdog do work even if it's oscillator gets a hickup. Also, some built-in watchdog solutions makes use of a separate RC oscillator.
The problem here is: how many times would a built-in watchdog fail to reset the chip, while an external would manage? Theory is one thing, but many of the situations that would affect a built-in watchdog would also make the chip unable to respond to an external reset. That is the reason why solutions built for extreme reliability are using several redundant modules that can be powered up/down independently. But that is a completely different concept than internal/external watchdog.