Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/26/99 09:42
Read: times


 
#257 - RE: Implementation of watchdog timer
WDOG timer is used to 'wake up' microcontroller from 'driving insane'. If the program is running in the predictive way (as programmed), there is no need to reset it, even though the program in waiting for a signal that never happens (you should ensure that it happens or build in a code with some timeout timers or so).
If some external strong EM field disturbs controller (for example switching on a neon light, or a bad filtered handheld drilling machine with a brush DC-motor where some sparks can be seen) the program execution can no longer be predictive (it comes out of control - it 'hangs'). Sometimes program counter is changed, machine instruction code is wrong interpreted or the result of instruction is invalid. Normal WDOG refresh ceases and after a timeout, controller is reset to start all over again in a regular way.
It is recommended to use WDOG in applications that run standalone and maybe 24 hours a day (like small telephone systems, data loggers, timers etc.)
(Imagine that your telephne system 'hangs'. You have to go to the celer, disconnect it from the mains and replug again to reset the device.)

Put your WDOG refresh code in your main program (better than using timer interrupts, because program execution can enter some undefined loops, but interrupts run OK, so WDOG is refreshed even though controller in fact hangs.)
As Jon said, refreshing WDOG too often is not a problem but don't take it literally. If too many refresh code is in your program, it can accidentaly enter a WDOG refresh loop and therefore WDOG has no function for it is refreshed in a regular way.

Hope I've helped you a bit.


List of 6 messages in thread
TopicAuthorDate
Implementation of watchdog timer            01/01/70 00:00      
RE: Implementation of watchdog timer            01/01/70 00:00      
RE: Implementation of watchdog timer            01/01/70 00:00      
RE: Implementation of watchdog timer            01/01/70 00:00      
RE: Implementation of watchdog timer            01/01/70 00:00      
RE: Implementation of watchdog timer            01/01/70 00:00      

Back to Subject List