elexhobby
Junior Member level 3
clrwdt example watchdog
Can somebody please explain me the concept of watchdog timer in PIC?
What does it do? It is said that before sleep the watchdog timer should be cleared, & it can ‘wake up’ the uC from sleep. But how does it decide the delay after which it should wake up the uC?
I can’t understand why Watchdog timer is necessary to wake up the uC, if any other interrupt can.
Also, is there any other ingenious application of the Watchdog timer besides during sleep operation.
I have read that it resets the uC whenever it goes in an infinite loop.
But how does the watchdog timer inintiate itself (how does it know that the uC has crashed). If my program consists of some periodic activity, say transferring data serially, the watchdog timer may feel this is an infinite loop - since I am repeating the same task.
In such a case won't the programmer have the headache of continuously resetting the watchdog timer after every few instructions to prevent resetting the uC
Kindly help…
Can somebody please explain me the concept of watchdog timer in PIC?
What does it do? It is said that before sleep the watchdog timer should be cleared, & it can ‘wake up’ the uC from sleep. But how does it decide the delay after which it should wake up the uC?
I can’t understand why Watchdog timer is necessary to wake up the uC, if any other interrupt can.
Also, is there any other ingenious application of the Watchdog timer besides during sleep operation.
I have read that it resets the uC whenever it goes in an infinite loop.
But how does the watchdog timer inintiate itself (how does it know that the uC has crashed). If my program consists of some periodic activity, say transferring data serially, the watchdog timer may feel this is an infinite loop - since I am repeating the same task.
In such a case won't the programmer have the headache of continuously resetting the watchdog timer after every few instructions to prevent resetting the uC
Kindly help…