English
Language : 

W681308DG Datasheet, PDF (26/64 Pages) Nuvotem Talema – W681308 USB Audio Controller from Nuvoton integrates fast 8051 Microcontroller Unit (MCU)
W681308
XXXX PRODUCT DESCRIPTION
The main use of the Watchdog timer is as a system monitor. This is important in real-time control applications. In case of
some power glitches or electro-magnetic interference, the processor may begin to execute errant code. If this is left
unchecked the entire system may crash. Using the watchdog timer interrupt during software development will allow the user
to select ideal watchdog reset locations. The code is first written without the watchdog interrupt or reset. Then the watchdog
interrupt is enabled to identify code locations where interrupt occurs. The user can now insert instructions to reset the
watchdog timer which will allow the code to run without any watchdog timer interrupts. Now the watchdog timer reset is
enabled and the watchdog interrupt may be disabled. If any errant code is executed now, then the reset watchdog timer
instructions will not be executed at the required instants and watchdog reset will occur.
WD1
0
0
1
1
WD0
0
1
0
1
Watchdog
Interval
223
225
226
228
Number of
Clocks
8388608
33554462
67108864
268435456
Time@12MHz
699.05 ms
2796.20 ms
5592.41 ms
22369.62 ms
Time@24MHz
349.53 ms
1398.10 ms
2796.20 ms
11184.81 ms
Time@48MHz
174.76 ms
699.05 ms
1398.10 ms
5592.41 ms
Table 6 Time-Out Values For Watchdog Timer
The Watchdog timer will be disabled by a power-on/fail reset. The Watchdog timer reset does not disable the watchdog timer,
but will restart it.
NOTE: In general, software should restart the timer to put it into a known state.
D8H
WDCON
External
Reset
Bit 7
-
0
Bit 6
POR
x
Bit 5
-
0
Bit 4
-
x
Bit 3
WDIF
0
Bit 2
WTRF
x
Table 7 Watchdog Control WDCON SFR
Bit 1
EWT
x
Bit 0
RWT
0
Control Bit
Name
Function
POR
Power-on Reset Flag
Hardware will set this flag on a power up condition. This flag can be read or written
by software. A write by software is the only way to clear this bit once it is set.
WDIF
Watchdog Timer
Interrupt Flag
This bit is set by hardware to indicate that the time-out period has elapsed and
invoke watch dog timer interrupt if enabled(EWDI=1). This bit must be cleared by
software.
WTRF
Watchdog Timer
Reset Flag
Hardware will set this bit when the watchdog timer causes a reset. Software can
read it but must clear it manually. A power-fail reset will also clear the bit. This bit
helps software in determining the cause of a reset. If EWT = 0, the watchdog timer
will have no affect on this bit.
26
Rev1.2