ADVANCE INFORMATION
VCT 38xxA
5.7.3.3. Watchdog
The Watchdog module serves to monitor undisturbed
program execution. A failure of the program to retrigger
the Watchdog within a preselectable time will pull the
RESQ pin low and thus reset the VCT 38xxA (see Fig.
5–3 and Fig. 5–4). The Watchdog reset source is only
enabled after the first write access to register CSW1
(see Section 5.7.3.2. on page 92).
Once the Watchdog is enabled, it cannot be dis-
abled anymore, neither by software nor by pulling
down the external RESQ pin. Only after power up
the watchdog is disabled.
CSW1
Trigger Reg1
CSW1
CSW1
2.write
& even
3.write
& odd
1. write
Trigger Reg2
Timer Register
8
8
8
clk = f
/8192
CPU
1. write
load
=
zero
≥1
&
8-Bit-Counter
&
D
Q
2.write & even
3.write & odd
≥1
C
S
reset in
reset out
&
1. write
S Q
R
S Q
R
CSW1.WDRES
power on
≥1
write CSW1
Fig. 5–4: Block diagram of watchdog
The Watchdog contains a down-counter that gener-
ates a reset when it wraps from zero to FFh. It is
reloaded with the content of the watchdog timer regis-
ter, when, on a write access to register CSW1, watch-
dog trigger registers 1 and 2 contain bit complemented
values. Resetting the VCT 38xxA initializes the watch-
dog timer register to FFh, thus forcing the Watchdog to
create a maximum reset interval.
The resolution of the Watchdog is 8192/fCPU. In CPU
Slow mode (see Section 5.2.1. on page 86), the watch-
dog is clocked with the reduced CPU clock.
The second and all following even numbered write
accesses load watchdog trigger register 1, the third
and all following odd numbered write accesses load
watchdog trigger register 2.
The Watchdog is controlled by register CSW1. The
first write access to it loads the timer register value set-
ting the Watchdog’s unretriggered reset interval. The
desired interval can be programmed by setting the
CSW1 value to:
In all future, the CPU has to write alternatingly to regis-
ter CSW1 value and bit complement value, thus retrig-
gering the up-counter. Failure to retrigger will result in
an overflow of the up-counter generating a Watchdog
reset.
It is not allowed to change a chosen value. Writing a
wrong value to CSW1 immediately sets the flag
CSW1.WDRES and prohibits further retriggering of the
watchdog counter.
Interval × fCPU
Value = ----------------------------------- – 1
8192
CSW1.WDRES is true after a Watchdog reset. Only a
Supply Supervision reset or a write access to register
CSW1 clears it.
Micronas
93