Watchdog Timer
Watchdog Timer
There is a flexible watchdog timer integrated into the ÉlanSC520 Microcontroller. It supports a
See the following pseudo code as a simple example of watchdog operation.
MMCR_base = DF00:0h | ; segment:offset address |
WDTMRCTL = MMCR_base + 0CB0h | |
MemWrite WDTMRCTL, 03333h | ; Key sequence to allow write access to |
| ; control |
MemWrite WDTMRCTL, 0CCCCh | ; register. These are |
MemWrite WDTMRCTL, 0C010h | ; Enable watchdog timer. 4 second timer. |
| ; Reset on timeout. |
Begin program loop
;perform useful instructions here that
;will never take more than 4
;seconds to complete.
MemWrite WDTMRCTL, 0AAAAh ; Key sequence to reset the timer ; countdown
MemWrite WDTMRCTL, 05555h ; These are
End program loop
For detailed programming instructions for the integrated watchdog timer, see chapter 19 of the ÉlanSC520 Microcontroller User's Manual, and chapter 16 of the Register Set Manual.
Reference – 33 |