Appendix E: Programming System Watchdog Timer - Lanner LVC-5000-B0 User Manual

In-vehicle computing, rugged vehicle pc, lvc-5000-b series
Table of Contents

Advertisement

Appendix E:
Programming System
Watchdog Timer of the
LVC-5000-B
A watchdog timer is a piece of hardware that can be
used to automatically detect system anomalies and reset
the processor in case there are any problems. Generally
speaking, a watchdog timer is based on a counter that
counts down from an initial value to zero. The software
selects the counter's initial value and periodically restarts
it. Should the counter reach zero before the software
restarts it, the software is presumed to be malfunctioning
and the processor's reset signal is asserted. Thus, the
processor will be restarted as if a human operator had
cycled the power.
For sample watchdog code, see watchdog folder under
LVC-5000 Utility on the Driver and Manual CD
Executing through the Command Line:
Execute the WD.EXE file under DOS (WD.EXE and
CWSDPMI.EXE should be placed on same directory),
then enter the values from 0~255. The system will reboot
automatically according to the time-out you set.
/////////////////////////////////////////////////////////
You can write your own program by modifying the
source code F81865_Test.cpp.. The index address is 2EH.
////////////////////////////////////////////////////////////////////
/////
// F81865_Test.cpp : F81865_test.exe utility for F81865.lib
APIs demonstration.
//
// History:
//
7/15/2011
program.
#include <winsock2.h>
#include "Windows.h"
#include "stdio.h"
Brand new F81865_test
#include "F81865.h"
#define PARAMETER_HELP
"The F81865 GPIO utility of Lanner\n"\
"-------------------------------------\n"\
"Usage:\n"\
" F81865_test DIO_IN
number\n"\
" F81865_test DIO_OUT
number value\n"\
" F81865_test PIO
value\n"\
" F81865_test RunLED
number value\n"\
" F81865_test AlarmLED
number value\n"\
" F81865_test GPS_LED
number value\n"\
" F81865_test WirelessLED
number value\n"\
" F81865_test WatchDog
" F81865_test CaseOpen\n"\
" F81865_test CaseOpen_Clear\n"\
" F81865_test Sleep
milliseconds\n"\
"\n"\
"Argement:\n"\
" DIO_IN
In.\n"\
" DIO_OUT
" PIO
" RunLED
" AlarmLED
Set Alarm LED state.\n"\
" GPS_LED
Set GPS LED state.\n"\
" WirelessLED
Set Wireless LED state.\n"\
"\n"\
port_
port_
port_number
port_
port_
port_
port_
seconds\n"\
Read state from DIO
Set DIO Out state.\n"\
Set PIO LED state.\n"\
Set RUN LED state.\n"\

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lvc-5000-b1Lvc-5000-b3Lvk-cbsa1Lvc-5000-b2Lvk-cbpe1

Table of Contents