Intel386™ EX EMBEDDED MICROPROCESSOR USER’S MANUAL
17-4
The reload registers hold a user-defined value that reloads the down-counter when one of the fol-
lowing reload events occurs:
• In watchdog mode, when system software executes a specific instruction sequence (called a
lockout sequence) to the WDTCLR location
• In bus monitor mode, when the bus interface unit asserts ADS#
• In all modes, when the down-counter reaches zero
Software can read the status register to determine the mode of the WDT, and can read the count
registers to determine the current value of the down-counter.
17.2.1 Idle and Powerdown modes
In CPU-idle mode, the WDT is disabled only if it is in watchdog mode. Since no software can
execute while the CPU is in idle mode, the software watchdog is unnecessary. The WDT operates
normally in general-purpose timer and bus-monitor modes if the CPU is in idle mode.
In CPU-powerdown mode, the WDT unit is disabled, like all other peripherals.
17.2.2 General-purpose Timer Mode
The WDT defaults to general-purpose timer mode after reset. If your system has no requirement
for a software watchdog or a bus monitor, you can use the WDT in this mode. At reset, the down-
counter begins decrementing once every clock cycle, beginning at 3FFFFFH (the initial values of
the reload and count registers). Unless you intervene, the WDT times out after 4 million (2
22
) pro-
cessor clock cycles.
Software can read the count registers (WDTCNTH and WDTCNTL) at any time to determine the
current value of the down-counter. You might, for example, read the count when one event occurs,
read it again when a second event occurs, then calculate the elapsed time between the two events.
When the down-counter reaches zero, the 8-state binary counter drives the WDTOUT pin high
for eight processor clock cycles (16 CLK2 cycles). During the clock cycle immediately after the
down-counter reaches zero, the down-counter is reloaded with the contents of the reload registers.
If you want fewer than 4 million (2
22
) processor clock cycles between WDT timeouts, write a 32-
bit reload value to the reload registers (Figure 17-4):
1. Write the upper 16 bits of the reload value to WDTRLDH.
2. Write the lower 16 bits of the reload value to WDTRLDL.
In the general-purpose timer mode, you cannot reload the counter except on a WDT timeout.
However, you can force a reload by entering bus monitor mode, allowing an ADS# to reload the
counter, then switching back to general-purpose timer mode.