
Watchdog Timer
Élan™SC520 Microcontroller User’s Manual
19-5
19.4.2
Interrupts
An interrupt is asserted upon time-out if the watchdog timer interrupt condition is configured
accordingly in the Watchdog Timer Control (WDTMRCTL) register.
■
If the watchdog timer is configured for interrupts, the IRQ_FLG bit in the Watchdog Timer
Control (WDTMRCTL) register is set when the interrupt is generated.
■
The interrupt service routine should examine this flag to determine if the interrupt was
generated by the watchdog timer.
■
If the IRQ_FLG is set, the interrupt service routine should clear the flag by writing the
correct keyed sequence to the Watchdog Timer Control (WDTMRCTL) register and
follow by writing a 1 to this bit.
■
If the IRQ_FLG bit is not cleared when a second watchdog timer time-out occurs, a WDT
system reset is generated, rather than a second interrupt event.
Note: The IRQ_FLG bit is not cleared on a read. The bit must be cleared by writing the
correct keyed sequence to the watchdog timer before writing a 1 to the corresponding bit
position.
19.4.3
AMDebug™ Technology Interface
The AMDebug technology interface allows emulator code to run without having to deal with
possible watchdog timer time-outs. It also allows emulators to be used more effectively with
applications that enable the watchdog timer. Entering AMDebug technology mode stops
the watchdog timer counter from counting.
19.4.4
Software Considerations
If a watchdog timer time-out occurs when the timer is programmed with the WRST_ENB
bit cleared, an interrupt is generated, the time-out counter is reset, and the IRQ_FLG bit in
the Watchdog Timer Control (WDTMRCTL) register is set. If the IRQ_FLG bit is not cleared
by software before a second watchdog timer time-out, a system reset is generated,
regardless of the setting of the WRST_ENB bit. The IRQ_FLG bit can be cleared, but not
set, by software.
Generation of the internal interrupt signal on the first watchdog timer time-out can be useful
in systems where it may be possible to recover from spurious pulses, bad data, or incorrect
code. This is especially true for the case where potential data recovery is important. Such
systems should have the interrupt handler routine to ensure that it has not been corrupted
by errant code. The watchdog timer must function in all cases where the software has failed
to respond appropriately. The ÉlanSC520 microcontroller’s watchdog timer has
incorporated several features to ensure that this is the case.
■
Once software enables the watchdog timer, the registers become read-only, except for
the ENB and IRQ_FLG bits. This allows boot or monitor code to disable the watchdog
timer until the system has been configured.
■
All writes to the watchdog timer must be preceded by writes of a keyed sequence.
Detection of the keyed sequence allows a single write to the Watchdog Timer Control
(WDTMRCTL) register.
■
The watchdog timer time-out counter can only be reset by setting the ENB bit or by
writing a special clear key sequence to the Watchdog Timer Control (WDTMRCTL)
register address.
These features guarantee that the watchdog timer is not affected by errant code.
Содержание Elan SC520
Страница 1: ...lan SC520 Microcontroller User s Manual Order 22004A...
Страница 4: ...iv lan SC520 Microcontroller User s Manual...
Страница 28: ...Introduction xxviii lan SC520 Microcontroller User s Manual...
Страница 42: ...Architectural Overview 1 14 lan SC520 Microcontroller User s Manual...
Страница 78: ...System Initialization 3 22 lan SC520 Microcontroller User s Manual...
Страница 108: ...Clock Generation and Control 5 10 lan SC520 Microcontroller User s Manual...
Страница 118: ...Reset Generation 6 10 lan SC520 Microcontroller User s Manual...
Страница 148: ...System Arbitration 8 24 lan SC520 Microcontroller User s Manual...
Страница 214: ...SDRAM Controller 10 36 lan SC520 Microcontroller User s Manual...
Страница 230: ...Write Buffer and Read Buffer 11 16 lan SC520 Microcontroller User s Manual...
Страница 288: ...GP Bus DMA Controller 14 22 lan SC520 Microcontroller User s Manual...
Страница 316: ...Programmable Interval Timer 16 8 lan SC520 Microcontroller User s Manual...
Страница 328: ...Software Timer 18 4 lan SC520 Microcontroller User s Manual...
Страница 346: ...Real Time Clock 20 12 lan SC520 Microcontroller User s Manual...
Страница 360: ...UART Serial Ports 21 14 lan SC520 Microcontroller User s Manual...
Страница 414: ...AMDebug Technology 26 8 lan SC520 Microcontroller User s Manual...