8 WATCHDOG TIMER (WDT2)
8-4
Seiko Epson Corporation
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
WDT2 Control Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
WDTCTL
15–11 –
0x00
–
R
–
10–9 MOD[1:0]
0x0
H0
R/WP
8
STATNMI
0
H0
R
7–5 –
0x0
–
R
4
WDTCNTRST
0
H0
WP
Always read as 0.
3–0 WDTRUN[3:0]
0xa
H0
R/WP –
Bits 15–11 Reserved
Bits 10–9 MOD[1:0]
These bits set the WDT2 operating mode.
Table 8.4.2 Operating Mode Setting
WDTCTL.
MOD[1:0] bits
Operating mode
Description
0x3
Reserved
–
0x2
RESET after NMI mode If the WDTCTL.STATNMI bit is not cleared to 0 after an NMI
has occurred due to a counter compare match, WDT2 issues
a reset when the next compare match occurs.
0x1
NMI mode
WDT2 issues an NMI when a counter compare match occurs.
0x0
RESET mode
WDT2 issues a reset when a counter compare match occurs.
Bit 8
STATNMI
This bit indicates that a counter compare match and NMI have occurred.
1 (R):
NMI (counter compare match) occurred
0 (R):
NMI not occurred
When the NMI generation function of WDT2 is used, read this bit in the NMI handler routine to con-
firm that WDT2 was the source of the NMI.
The WDTCTL.STATNMI bit set to 1 is cleared to 0 by writing 1 to the WDTCTL.WDTCNTRST bit.
Bits 7–5
Reserved
Bit 4
WDTCNTRST
This bit resets the 10-bit counter and the WDTCTL.STATNMI bit.
1 (WP): Reset
0 (WP): Ignored
0 (R):
Always 0 when being read
Bits 3–0
WDTRUN[3:0]
These bits control WDT2 to run and stop.
0xa (WP):
Stop
Values other than 0xa (WP): Run
0xa (R):
Idle
0x0 (R):
Running
Always 0x0 is read if a value other than 0xa is written.
Since an NMI or reset may be generated immediately after running depending on the counter value,
WDT2 should also be reset concurrently when running WDT2.
WDT2 Counter Compare Match Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
WDTCMP
15–10 –
0x00
–
R
–
9–0 CMP[9:0]
0x3ff
H0
R/WP
Bits 15–10 Reserved