Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What does internal watchdog do in a micro ?

Status
Not open for further replies.

nzkunal

Member level 2
Joined
Mar 11, 2004
Messages
52
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
377
Internal watchdog

Hi,
I wanted to know what an internal watchdog does in a micro
thanks
 

Re: Internal watchdog

Look here:


best regards
 

Re: Internal watchdog

It is similar between special Watchdog and Internal watchdog.
if you want detail imformation,Pls see atmega8 datasheet,that have detail work theory.
 

Re: Internal watchdog

nzkunal said:
I wanted to know what an internal watchdog does in a micro
Essentially, it saves external watch-dog implementation :)
 

Re: Internal watchdog

Internal watcdog is independent counter inside mcu which counts mcu clocks. When its get overrun from 0xFFFF to 0x0000 it reset mcu. So, you have from time to time to reset this counter.


Mr.Cube
 

Re: Internal watchdog

To prevent your firmware trapped in a dead loop.

Generally speaking, you have to touch the watchdog
timer from time to time in your firmware, within some max
time interval, once the watchdog mechanism is enabled.
Or the watchdog will generate an internal reset signal to
reset the MPU/MCU. That forces your program to run from
the very beginning.

This mechanism also help prevent the program crush due to
noise or hazard. For example, the program counter is detroyed
by some spike in the power.
 

Re: Internal watchdog

What is a watchdog .. our friend WATERMAN explained well !
Let me just complement it ..
What do you do when your computer (for whatever reason) won't respond ?? .......you will answer after a while I HIT THE RESET BUTTON

But if the computer is on a closed box and inside the car or in a big mechanical machine .. Well it's a big problem to go and reset it .. On top a non responding computer may cause damage to the machine is supposed to control ..
To aliviete this there is the WATCHDOG timer ,is not a very SOPHISTICATED machanism ,, but it can work is some situations ..and be more than enough ..
This timer is an agent that is going to try to reset the machine according to the PERIOD of time programmed .. So the engineer turns on this timer and let's say it will reset the computer in 5 seconds .. So is up to the engineer to avoid this .. by reseting the timer ..So if the computer has to wait for some data to arrive .. The programmer has to take in account that he only disposes of 5 seconds of waiting time .. before the timer sends him to hell ( figure of speach) so you better get the data before those 5 seconds or reset the timer before it resets YOU!
When reseting the watchdog timer .the same 5 seconds start afresh ..so you need to be "CONCIENT" of reseting the watchdog before it resets you !Thats the whole philosophy .. KILL The TIMER beore it KILLS YOU ..
by doing that all the time and correctly, you ensure that the program is going as planned . IF there is an electric SPIKE as aour FRIEND above INDICATED .. well the computer might do something else .. But because it's not in the logical chains of events . THIS TIME THE WATCHDOG TIMER WON"T BE RESETED .SO AFTER 5 seconds in our example THE WATCHDOG TIMER will RESET THE COMPUTER .BINGO THAT'S THE PROTECTION THAT YOU WANTED ..
The engineer will add some code at the computer boot to see if it is starting from a COLD START or a WARM start ( WATCHDOG RESET)
Thi is just a matter of reading a flag to see who resetted the computer last time .. If it was a WATCHDOG RESET .. stop evrerything ! ..call the operator .. call 911 ..call the deparment of defense .. or any other action that you will like to implement ..
This is is just a CHEAP way to insure gain of control after a FAILURE on a computer .. I WOULD NEVER USE THIS ON A AUTOMATIC PILOT OF AN AIRPLANE .. for that there are other techniques !
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top