User`s manual
BDM-610000082 Rev A Chapter 4: Using the cpuModule 65
Watchdog Timer Control
The cpuModule includes a Watchdog Timer, which provides protection against programs “hanging”, or getting
stuck in an execution loop where they cannot respond correctly. The watchdog timer consists of a counter, a
reset generator, and an interrupt generator. When the counter reaches the interrupt time-out, it can generate an
interrupt. When the counter reaches the reset time-out, the system is reset. The counter is “refreshed,” or set back
to zero by reading from a specific register. The watchdog can also be put into an “inactive” state, in which no
resets or interrupts are generated.
The ability to generate an interrupt allows the application to gracefully recover from a bad state. For example,
consider a system that has a reset time-out of 2 seconds, interrupt time-out of 1 second, and the watchdog timer
is refreshed every 0.5 seconds. If something goes wrong, an interrupt is generated. The Interrupt service routine
then attempts to restart the application software. If it is successful, the application is restarted in much less time
than a full reboot would require. If it is not successful, the system is rebooted.
Due to system latency, it is recommended that the Watchdog be refreshed at about half of the reset time-out
period, or half of the interrupt time-out period, whichever is applicable.
Register Description
The Advanced Watchdog Timer has a Setup Register and a Runtime Register. The Setup Register is set by the
BIOS, and can be adjusted by entering the BIOS Setup Utility, and going to “Advanced”, “RTD Advanced Options”,
“RTD Miscellaneous Feature Control”. The Setup Register may also be read by the driver to determine if the
Watchdog is enabled, and the interrupt and base address that it is using.
Reading the Runtime Register also refreshes the watchdog timer.
Note Enabling the watchdog timer in the BIOS does not actually arm it. The watchdog timer can be
armed by accessing I/O address E85h, as explained below.
Table 42 Advanced Watchdog Setup Register E8Bh
D7 D6 D5 D4 D3 D2 D1 D0
Reserved WDT_IRQ
Select Interrupt for WDT
000 = Disabled
001 = IRQ5
010 = Reserved
011 = IRQ10
100 = IRQ11
101 = Reserved
110 = IRQ3
111 = IRQ6
Reg_Enable
0 = Watchdog timer is disabled and
Runtime Register will not appear
in I/O map
1 = Watchdog Timer is enabled.
Runtime Register will appear in
I/O map
Table 43 Advanced Watchdog Runtime Register E85h
D7 D6 D5 D4 D3 D2 D1 D0
WDT_Active
0 = Watchdog
timer is
disabled.
1 = Watchdog is
armed and
can generate
resets and
interrupts.
WDT_IRQ_Ena
0 = Watchdog
interrupt is
disabled.
1 = Watchdog
interrupt is
enabled.
Reserved WDT_IRQ_Time
Select Interrupt
time for
WDT
00 = 0.25s
01 = 0.50s
10 = 0.75s
11 = 1.00s
WDT_RST_Time
Select Reset time
for WDT
00 = 2.00s
01 = 0.50s
10 = 0.75s
11 = 1.00s