17 WATCHDOG TIMER (WDT)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
17-1
Watchdog Timer (WDT)
17
WDT Module Overview
17.1
The S1C33L26 incorporates a watchdog timer to detect the CPU running uncontrollably.
The features of WDT are listed below.
• 30-bit up counter with a comparator
• Reset or NMI can be generated when the counter reaches the specified value if WDT has not been reset.
• The count clock is selectable from the system clock (PCLK2) and an external clock (T16A_EXCL_0).
• Can output the generated NMI signal (#WDT_NMI) and the comparator output (WDT_CLK).
Figure 17.1.1 shows the WDT configuration.
RESEN
CLKSEL
RESET
Watchdog timer reset (WDRESEN)
Watchdog timer Run/Stop control (RUNSTP)
Watchdog timer
NMIEN
CLKEN
NMI
30-bit comparison data register (CMPDT)
Internal data bus
30-bit up counter (CTRDT)
CMU
Comparator
PCLK2
WDT_CLK
#WDT_NMI
Comparison
signal
Clock
output
circuit
External clock
T16A_EXCL_0
1.1 WDT Configuration
Figure 17.
The watchdog timer consists of a 30-bit up counter and comparison data register for generating an NMI or internal
reset signal at programmable cycles. By resetting the watchdog timer within such a cycle in software so as not to
generate NMI or internal reset signals, it is possible to detect a program running uncontrollably that does not ex-
ecute that processing routine. The PCLK2 clock (= system clock) or external clock input for the 16-bit PWM timer
(T16A5) (T16A_EXCL_0) can be selected as the count clock for the watchdog timer. Moreover, a clock can be
generated synchronously with NMI/reset generation cycles (set by the comparison data register) and output from
the watchdog timer to external devices.
WDT Input/Output Pins
17.2
Table 17.2.1 lists the input/output pins for the WDT module.
2.1 List of WDT Pins
Table 17.
Pin name
I/O
Qty
Function
T16A_EXCL_0
I
1
T16A5 Ch.0/WDT external clock input pin
Inputs an external clock as the counter clock.
WDT_CLK
O
1
Watchdog timer clock output pin
Outputs the reset/NMI cycle clock generated in the watchdog timer to external
devices.
#WDT_NMI
O
1
Watchdog timer NMI output pin
Outputs the NMI signal generated in the watchdog timer to external devices.
The WDT input/output pins (T16A_EXCL_0, WDT_CLK, #WDT_NMI) are shared with I/O ports and are initially
set as general purpose I/O port pins. The pin functions must be switched using the port function select bits to use
the general purpose I/O port pins as WDT input/output pins.
For detailed information on pin function switching, see the “I/O Ports (GPIO)” chapter.