
NUC126
Aug. 08, 2018
Page
929
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
1110
1536
1536 * 64 * T
WWDT
9.8304 s
1111
2048
2048 * 64 * T
WWDT
13.1072 s
Table 6.25-1 WWDT Prescale Value Selection and Time-out Period
WWDT Counting
When the WWDTEN (WWDT_CTL[0]) is set, WWDT counter will start down counting from 0x3F to 0
and the interval of each count and WWDT compare time-out period is selected by PSCSEL
(WWDT_CTL[11:8]). Table 6.25-1 shows 4-bit PSCSEL setting correlate with prescale value and
maximum compare time-out period when WWDT clock source is selected as 10 kHz. To prevent
program runs to disable WWDT counter counting unexpected, all the control bits in WWDT_CTL
register can only be written once after chip is powered on or reset.
WWDT Compare Match Interrupt
When WWDT counter value CNTDAT (WWDT_CNT[5:0]) down counts equal to window compare
value CMPDAT (WWDT_CTL[21:16]) and internal preacale counter counts to 0, the WWDT counter
compare match interrupt WWDTIF (WWDT_STATUS[0]) will be generated and it can be cleared by
writing 1. Figure 6.17-13 shows an example of WWDT compare match interrupt when PSCSEL
(WWDT_CTL[11:8]) is 0x2 and prescale value is 4.
WWDT_CLK
WWDTIF
(WWDT_STATUS[0])
CMPDAT
(WWDT_CTL[21:16])
0x3E
CNTDAT
(WWDT_CNT[5:0])
0x3F
0x3E
0x3D
0x3C
0x3B
x
Prescale counter
3
1 0 3 2 1 0 3 2 1 0
2
3
2 1 0 3 2
1
WWDTEN
(WWDT_CTL[0])
Figure 6.25-3 WWDT Compare Match Interrupt when CMPDAT is 0x3E
WWDT Counter Reload and Reset System
While WWDT counter and internal prescale counter both down counts to 0, WWDT reset system signal
is occurred and system will be reset. If WWDTIF (WWDT_STATUS[0]) is generated, user can write
0x00005AA5 in WWDT_RLDCNT register to reload CNTDAT (WWDT_CNT[5:0]) to 0x3F, and also to
prevent
WWDT
reset
system
signal
occurred.
If current CNTDAT is larger than CMPDAT (WWDT_CTL[21:16]), it means WWDTIF not occurred yet,
when user writes 0x00005AA5 to the WWDT_RLDCNT register, the WWDT reset system signal will be
generated
immediately
to
cause
chip
reset
also.
The behavior of counter reload and system reset are shown in Figure 6.25-4.