What Is Watchdog?

when micro controller hang up or gets crashed.To overcome these situation is to automatically reset the system.

Whenever Such a Situation Arises:-

The watchdog is a hardware or software generated timer interrupt which resets the system in the situation when system huge up . The watchdog timers are also used in case when you intentionally required the system without any physical interference.Watchdog is a special timer which can be enabled in any section of the code and when enable it ensurers that a certain number of instructions execute within a per-defined time frame.


Watch Dog Timer Control Register are:-

WDTOE( watch dog turn-off enable).

The watchdog timer is disabled by configuring WDTOE and WDE bits.

WDE(watch dog enable) -watchdog timer is enabled by writing 1 to WDE bit.

WDP(watch  dog prescal ) bits.

These three bits determine the watchdog time out condition.

Watchdog Timer Works:-

The watchdog timer starts when the WDE bit is enable and pres-cal bits are configured for time-out conditions.As watchdog timer reaches time-out condition, watchdog timer is reset and generate a pulse of one clock.Cycle with reset the program counter. when Watchdog timer resets the timer , the WDRF (watch dog reset Flag) bit in micro-controller register is set by the hardware to disable the watchdog timer.

1. Set the WDE and WDTOE bits in same clock cycle WDTCR register. The logic one must be written to WDE bit even though it is set to one already.

2. After four clock pulses. write logic 0 to the WDE bit. otherwise watchdog timer will not be Disable.

0 comments:

Post a Comment

Don't Forget to comment

About Me

My photo

HI i am mohammed  a Embedded Software Developer ,SEO specialist,Electronic engineer   Read more

ads