Setwdt – ADLINK MXC-6000 Series User Manual

Page 90

Advertising
background image

78

Watchdog Timer (WDT) Function Library

SetWDT

@ Description

Set the timeout value of the watchdog timer. There are two
parameters for this function to indicate the timeout ticks and
unit. ResetWDT or StopWDT should be called before the expi-
ration of watchdog timer, or the system will reset.

@ Supported controllers

MXC-6000

@ Syntax

C/C++

BOOL SetWDT(BYTE tick, BYTE unit)

@ Parameters

tick

Specify the number of ticks for watchdog timer. A valid
value is 1 - 255.

unit

Specify the timeout ticks of the watchdog timer.

@ Return codes

TRUE

if timeout value of watchdog timer is successfully set.

FALSE

if timeout value of watchdog timer is failed to set.

Value

Description

0

The unit for one tick is one second. For example, when one
tick is specified as 100 and the unit as 0, the timeout value is
100 seconds.

1

The unit for one tick is one minute. For example, whenone
tick is specified as 100 and the unit as 1, the timeout value is
100 minutes.

Advertising