Datasheet

UM10398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2014. All rights reserved.
User manual Rev. 12.3 — 10 June 2014 393 of 547
NXP Semiconductors
UM10398
Chapter 22: LPC111x/LPC11Cxx Windowed WatchDog Timer (WDT)
22.6 Clock control
The watchdog timer block uses two clocks: PCLK and WDCLK. PCLK is used for the APB
accesses to the watchdog registers and is derived from the system clock (see Figure 8
).
The WDCLK is used for the watchdog timer counting and is derived from the WDT clock
divider in Figure 8
. Several clocks can be used as a clock source for wdt_clk clock: the
IRC, the watchdog oscillator, and the main clock. The clock source is selected in the
syscon block (see Table 25
). The WDCLK has its own clock divider (Table 27) which can
also disable this clock.
There is some synchronization logic between these two clock domains. When the
WDMOD and WDTC registers are updated by APB operations, the new value will take
effect in 3 WDCLK cycles on the logic in the WDCLK clock domain. When the watchdog
timer is counting on WDCLK, the synchronization logic will first lock the value of the
counter on WDCLK and then synchronize it with the PCLK for reading as the WDTV
register by the CPU.
The watchdog oscillator can be powered down in the PDRUNCFG register (Table 44
) if it
is not used. The clock to the watchdog register block (PCLK) can be disabled in the
SYSAHBCLKCTRL register (Table 21
) for power savings.
Remark: The frequency of the watchdog oscillator is undefined after reset. The watchdog
oscillator frequency must be programmed by writing to the WDTOSCCTRL register (see
Table 13
) before using the watchdog oscillator for the WDT.
Fig 85. Windowed Watchdog Timer (WWDT) block diagram
watchdog
interrupt
WDRESET
(MOD [1])
WDTOF
(MOD [2])
WDINT
(MOD [3])
WDEN
(MOD [0])
chip reset
÷4
feed error
feed ok
wd_clk enable count
MOD
register
compare
WDTV
compare
in
range
underflow
feed sequence
detect and
protection
FEED
feed ok
feed ok
compare
0
interrupt
compare
24-bit down counter
WDINTVAL
WINDOW
TC
shadow bit
WDPROTECT
(MOD [4])
TC write