Watchdog Timer - Advantech UNO-1110 User Manual

Ti cortex am3505 din-rail pc with 2 x lan, 5 x com, 4 x usb
Hide thumbs Also See for UNO-1110:
Table of Contents

Advertisement

3.5.2

Watchdog Timer

There is a built-in watchdog timer in UNO-1110. Users can utilize the WDT driver with
standard WIN32 API to implement the watchdog function in their applications. To use
the watchdog driver, firstly user must open it via the name, "WDT1:", then use Devi-
ceIOControl function to access the watchdog hardware. The introduction below
includes the definition of DeviceIOControl and its parameters as well as an example.
How to Use the Control Code
There are 9 control codes for the operation codes in the WDT driver.
1. IOCTL _WDT_ENABLE:
Enable the Watchdog timer on your application. By default, if the Watchdog timer is
enabled, the WDT driver will automatically reload the timeout counter after a speci-
fied period and your application does not need to trigger the strobe periodically for
masking the timeout, unless use IOCTL_WDT_REBOOT timeout to stop this auto-
matic strobe triggering.
lpInBuffer: unused.
nInBufferSize: unused.
lpOutBuffer: unused.
nOutBufferSize: unused.
2. IOCTL _WDT_DISABLE:
Disable the Watchdog timer on your application.
lpInBuffer: unsed.
nInBufferSize: unused.
lpOutBuffer: unused.
nOutBufferSize: unused.
3. IOCTL_WDT_STROBE:
Trigger strobe signal to reload watchdog timeout counter. If your application uses
IOCTL_WDT_ENABLE
IOCTL_WDT_REBOOT to the WDT driver, your application must trigger the Watch-
dog once during the Watchdog timer period. If your application has not triggered at
the specified period, the device will re-boot automatically.
lpInBuffer: unused.
nInBufferSize: unused.
lpOutBuffer: unused.
nOutBufferSize: unused.
4. IOCTL_WDT_GET_TIMEOUT:
Get the Watchdog timeout value.
lpInBuffer: unused.
nInBufferSize: unused.
lpOutBuffer: The DWORD pointer to your Watchdog timeout setting. The Watchdog
timeout setting is just a number. 0 means 2 seconds, 1 means 5 seconds, 2 means
10 seconds, 3 means 15 seconds, 4 means 30 seconds, 5 means 45 seconds, 6
means 60 seconds, 7 means 120 seconds,8 means 300 seconds, 9 means 600 sec-
UNO-1110 User Manual
to
enable
the
Watchdog
36
first
and
then
sends

Advertisement

Table of Contents
loading

Table of Contents