Chapter
6
Software utirity
◆Watch-Dog Timer (WDT) Setting
You can set a watchdog timer by using tRasWdtmr function. Execute this function
periodically and program it so that the watchdog timer will not be reset.
Prototype of function
int tRasWdtmr ( DWORD second )
Argument
Reset time (in seconds) of the watchdog timer can be set.
Input range is 0~255.
When 0 is specified, the watchdog timer is deactivated.
Return
value
Returns 0 when execution of the function succeeds and a value other than
0 when it fails.
Explanation Although the time can be set in seconds by using this function, there is
an error margin of three seconds in the reset time of the watchdog timer.
For example, if the reset time of a watchdog timer is set to 30 seconds
later, you have to reconfigure a watchdog timer within 27 seconds.
When the watchdog timer is reset, data being written to storage is not
guaranteed. As Windows cannot handle shutdowns, if Windows is writing
system data, Windows system files may be corrupted.
Header file
TinyRAS.h
Inport library
TinyRAS.lib
DLL file
TinyRAS.dll
The header file and the library file are stored in the place specified when TinyRas is
installed.
(
Initial storage place
:
c:\ Program Files\CONTEC\TinyRAS\
)
Example programming
#include “TinyRAS.h”
int main ( void ){
tRasWdtmr(10); // The watch-dog timer after ten seconds resets it.
return 0;
}
88
User’s Manual