User`s manual

42 • Watchdog Timer & Utilities
The PXD-3710’s custom watchdog timer circuit is implemented in a
programmable logic device. The watchdog timer contains a "Control and
Status Register." The register allows the BIOS or user application to
determine if a watchdog time out was the source of a particular reset.
The watchdog timer drives the First and Second Stages as follows:
The watchdog times out (First Stage) after a selected timeout interval.
NMI or INIT (software selectable) is driven high.
A hard reset occurs (Second Stage).
The timeout period is 1–255 seconds or 1–255 minutes. The watchdog is
normally strobed by reading the Watchdog Register (3F0h). This clears the
counter. Writes to this register also clear the counter.
5.1.1 Using the Watchdog in an Application
The following topic is provided to help users learn how to use the watchdog
in an application. The Watchdog Reset function is also described. Sample
code is provided below. The Watchdog Reset is controlled through the
watchdog "Control and Status Register."
Watchdog Reset
An application using the reset feature enables the watchdog reset, sets
the terminal count period, and then periodically strobes the watchdog to
keep it from resetting the system. If a strobe is missed, the watchdog
times out and resets the system hardware. The example shown below
will reset the system after 15 seconds. ADLINK provides other
examples and various sub functions on the All-In-One CD.
WDT Programming
In order to simplify the programming code, ADLINK has provided a sub
function for programmers to implement with their software. For DOS,
Windows 98, and Window NT, the sub function format can be as shown
below:
Out_port (int IOport_number, int Counter_value)
IOport_number:0x3F0 -->W83977EF's configuration port.
0x2E -->W83627HF's configuration port.
Counter_value: 0 ~ 15300 (255 minutes)
(write a zero to disable the timer)
Under DOS, Windows 95 or 98
Create a project program name wdt.cpp under Turbo C/C++.
Under Windows NT
The library installation procedure:
(1) Run the setup program under NT environment.