Lynx EPM-4 manual Watchdog Timer

Models: EPM-4

1 53
Download 53 pages 2.48 Kb
Page 41
Image 41

Watchdog Timer

Watchdog Timer

There is a flexible watchdog timer integrated into the ÉlanSC520 Microcontroller. It supports a time-out period up to 30 seconds, and can generate an interrupt, NMI, or system reset when time- out occurs. The watchdog registers are protected by write key sequences.

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 16-bit memory writes.

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 16-bit memory writes.

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.

EPM-4 Reference Manual

Reference 33

Page 41
Image 41
Lynx EPM-4 manual Watchdog Timer