EasyManua.ls Logo

Philips LPC2101 - Applications; Chapter 18: Watchdog Timer (WDT); Description; Features

Philips LPC2101
279 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
User manual Rev. 01 — 12 January 2006 225
18.1 Features
Internally resets chip if not periodically reloaded.
Supports Debug mode.
Watchdog timer is enabled by software but requires a hardware reset or a watchdog
reset/interrupt to be disabled.
Incorrect/Incomplete feed sequence causes reset/interrupt if enabled.
Flag indicates watchdog reset.
Includes programmable 32-bit timer with internal pre-scaler.
Time period can be selected from (T
PCLK
x256x4) to (T
PCLK
x2
32
x 4) in multiples of
T
PCLK
x4.
18.2 Applications
The purpose of the watchdog is to reset the microcontroller within a reasonable amount of
time if it enters an erroneous state. When enabled, the watchdog will generate a system
reset if the user program fails to "feed" (or reload) the watchdog within a predetermined
amount of time.
For interaction of the on-chip watchdog and other peripherals, especially the reset and
boot-up procedures, please read Section 3.10
Reset” on page 33 of this document.
18.3 Description
The watchdog consists of a divide by 4 fixed pre-scaler and a 32-bit counter. The clock is
fed to the timer via a pre-scaler. The timer decrements when clocked. The minimum value
from which the counter decrements is 0xFF. Setting a value lower than 0xFF causes 0xFF
to be loaded in the counter. Hence the minimum watchdog interval is (T
PCLK
x256x4)
and the maximum watchdog interval is (T
PCLK
x2
32
x 4) in multiples of (T
PCLK
x4). The
watchdog should be used in the following manner:
Set the watchdog timer constant reload value in WDTC register.
Setup mode in WDMOD register.
Start the watchdog by writing 0xAA followed by 0x55 to the WDFEED register.
Watchdog should be fed again before the watchdog counter underflows to prevent
reset/interrupt.
When the watchdog counter underflows, the program counter will start from 0x0000 0000
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.
UM10161
Chapter 18: WatchDog Timer (WDT)
Rev. 01 — 12 January 2006 User manual

Table of Contents

Related product manuals