DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
296 of 571
1.
How to read this chapter
The contents of this chapter apply to all LPC29xx parts.
2.
Introduction
The purpose of the Watchdog timer is to reset the ARM9 processor within a reasonable
amount of time if the processor enters an error state. The Watchdog generates a system
reset if the user program fails to trigger it correctly within a predetermined amount of time.
The Watchdog is programmed with a time-out value and then periodically restarted. When
the Watchdog times out it generates a reset through the RGU.
To generate Watchdog interrupts in Watchdog debug mode the interrupt has to be
enabled via the interrupt-enable register. A Watchdog-overflow interrupt can be cleared by
writing to the clear-interrupt register.
Another way to prevent resets during debug mode is via the pause feature of the
Watchdog timer. The Watchdog is stalled when the ARM9 is in debug mode and the
PAUSE_ENABLE bit in the Watchdog timer control register is set.
The Watchdog reset output is fed to the Reset Generator Unit (RGU). The RGU contains
a reset-source register to identify the source when the device has gone through a reset.
See
3.
Watchdog programming example
The Watchdog should be set up for normal or debug mode as follows:
UM10316
Chapter 20: LPC29xx WatchDog Timer (WDT)
Rev. 00.06 — 17 December 2008
User manual
Table 250. Watchdog programming steps
Step
Normal mode
Debug mode
1
Read from Watchdog key register
(0x038). Returns value (0x251D8950).
Read from Watchdog key register
(0x038). Returns value (0x251D8950).
2
Write 0x251D8950 (key) to Watchdog
timeout register (0x03C).
It is now unlocked.
Write 0x251D8951 (key exor
wd_rst_dis) to Watchdog debug register
(0x040).
Reset generation is now disabled.
3
Write time-out value (e.g.0x0000FFFF)
to Watchdog timeout register .
This indicates time-out reset at 65,536
clock cycles. It is now locked again
Write 0x251D8950 (key) to Watchdog
timeout register (0x03C).
It is now unlocked.