beautypg.com

Appendix d: watchdog timer (wdt) function library, D.1 wdt with api/windows, Initwdt – ADLINK MXC-6300 Series User Manual

Page 103: Setwdt, D appendix: watchdog timer (wdt) function library, Wdt with api/windows, Initwdt setwdt

background image

Watchdog Timer (WDT) Function Library

91

MXC-6300

Appendix D: Watchdog Timer (WDT)

Function Library

This appendix describes use of the watchdog timer (WDT) func-
tion library for the MXC-6300 controller. The watchdog timer is a
hardware mechanism provided to reset the system if the operating
system or an application stalls. After starting, the watchdog timer
in the application must be periodically reset before the timer
expires. Once the watchdog timer expires, a hardware-generated
signal is sent to reset the system.

D.1 WDT with API/Windows

Matrix WDT API library files and a demo program (incl. source
code) can be found on the included driver CD or downloaded from
http://www.adlinktech.com.

To use the WDT function library for MXC-6300, include the header
file WDT.h and linkage library WDT.lib in the C++ project.

InitWDT

Initializes the watchdog timer function. Must be called before
the invocation of any other WDT function.

Syntax

C/C++

BOOL InitWDT()

Parameters

None

Return codes

TRUE

if watchdog timer is successfully initialized.

FALSE

if watchdog timer fails to initialize.

SetWDT

Sets the timeout value of the watchdog timer. There are two
parameters for this function to indicate the timeout ticks and