13 WaTChDOG TiMeR (WDT)
S1C17153 TeChniCal Manual
Seiko epson Corporation
13-1
(Rev. 1.0)
Watchdog Timer (WDT)
13
WDT Module Overview
13.1
The S1C17153 includes a watchdog timer module (WDT) that uses the OSC1A oscillator as its clock source. This
timer is used to detect CPU runaway.
The features of WDT are listed below.
• 10-bit up counter
• Either reset or NMI can be generated if the counter overflows.
Figure 13.1.1 shows the WDT configuration.
NMI
Reset
10-bit counter
Interrupt
control circuit
Run/Stop control
NMI/reset mode select
WDTRUN[3:0]
WDTMD
Watchdog timer reset
WDTRST
Watchdog timer
RTC reset
SLEEP/NORMAL
32 kHz
256 Hz
OSC1A
oscillator
OSC1A
divider
CLG
1.1 WDT Configuration
Figure 13.
The WDT module generates an NMI or reset (selectable via software) to the CPU if not reset within 131,072/f
OSC1A
seconds (4 seconds when f
OSC1A
= 32.768 kHz).
Reset WDT via software within this cycle to prevent NMI/resets, which in turn enables runaway detection for pro-
grams that do not pass through the handler routine.
Operation Clock
13.2
The WDT module uses the 256 Hz clock output by the CLG module (256 Hz clock derived from the OSC1A di-
vider) as the operation clock. Therefore, the OSC1A oscillator must be turned on before starting the WDT module.
However, the clock is not supplied to the WDT module in SLEEP mode even if the OSC1A oscillator is on. For
detailed information on clock control, see the “Clock Generator (CLG)” chapter.
notes
: • The WDT module input clock frequency is 256 Hz only when the OSC1A clock frequency is
32.768 kHz. The frequency and time described in this chapter will vary accordingly for other
OSC1A clock frequencies.
• The OSC1A divider is reset when the RTC starts running (when 1 is written to RTCRUN/RTC_
CTL register). This affects the count operations of the WDT module, as new 256 Hz clock
cycle begins from that point.
WDT Control
13.3
nMi/Reset Mode Selection
13.3.1
WDTMD/WDT_ST register is used to select whether an NMI signal or a reset signal is output when WDT has not
been reset within the NMI/reset generation cycle.
To generate an NMI, set WDTMD to 0 (default). Set to 1 to generate a reset.