UM10503 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2012. All rights reserved.User manual Rev. 1.3 — 6 July 2012 919 of 1269NXP Semiconductors UM10503Chapter 34: LPC43xx Windowed Watchdog timer (WWDT)• Flag to indicate Watchdog reset.• The WWDT uses the IRC as a fixed clock source.34.4 ApplicationsThe purpose of the Watchdog Timer is to reset the microcontroller within a reasonableamount of time if it enters an erroneous state. When enabled, a watchdog event will begenerated if the user program fails to feed (or reload) the Watchdog within apredetermined amount of time. The Watchdog event will cause a chip reset if configuredto do so.When a watchdog window is programmed, an early watchdog feed is also treated as awatchdog event. This allows preventing situations where a system failure may still feedthe watchdog. For example, application code could be stuck in an interrupt service thatcontains a watchdog feed. Setting the window such that this would result in an early feedwill generate a watchdog event, allowing for system recovery.34.5 DescriptionThe Watchdog consists of a fixed divide-by-4 pre-scaler and a 24-bit counter whichdecrements on every clock cycle. The minimum value from which the counter decrementsis 0xFF. Setting a value lower than 0xFF causes 0xFF to be loaded in the counter. Hencethe minimum Watchdog interval is (TWDCLK 256 4) and the maximum Watchdoginterval is (T WDCLK 224 4) in multiples of (TWDCLK 4). The Watchdog should be usedin the following manner:• Set the Watchdog time-out value in TC register.• Setup the Watchdog timer operating mode in MOD register.• Set a value for the watchdog window time in WINDOW register if windowed operationis required.• Set a compare value for the watchdog warning interrupt in the WARNINT register if awarning interrupt is required.• Enable the Watchdog by writing 0xAA followed by 0x55 to the FEED register.• The Watchdog must be fed again before the Watchdog counter reaches zero in orderto prevent a watchdog event. If a window value is programmed, the feed must alsooccur after the watchdog counter passes that value.When the Watchdog Timer is configured so that a watchdog event will cause a reset andthe counter reaches zero, the CPU will be reset, loading the stack pointer and programcounter from the vector table as in the case of external reset. The Watchdog time-out flag(WDTOF) can be examined to determine if the Watchdog has caused the reset condition.The WDTOF flag must be cleared by software.When the Watchdog Timer is configured to generate a warning interrupt, the interrupt willoccur when the counter matches the compare value defined by the WARNINT register.34.5.1 WWDT behavior in Debug modeIf code execution is halted in Debug mode, the WWDT stops counting until code executionresumes.