Watchdog - Lippert Cool SpaceRunner LX800 Technical Manual

Pc/104-plus cpu board
Table of Contents

Advertisement

Watchdog

Since the Watchdog is disabled in delivery status, it must be set up for proper use.
The Watchdog is an internal feature of the ITE8712 Super I/O. If the Watchdog is activated and the timer is not set
back within a programmed amount of time, the board does a system reset.
The mounted LEMT initialize a hardware reset and turns on the watchdog LED.
#include <stdio.h>
#include <sys/io.h>
#include <unistd.h>
#define CONF_ADDR 0x2E
#define CONF_DATA 0x2F
int main()
{
unsigned char i;
iopl(3);
outb(0x87, CONF_ADDR); // sets SIO in configuration mode (fixed sequence:
outb(0x01, CONF_ADDR); // 0x87,0x01,0x55,0x55)
outb(0x55, CONF_ADDR);
outb(0x55, CONF_ADDR);
outb(0x07, CONF_ADDR); // LDN=0x07
outb(0x07, CONF_DATA);
outb(0x72, CONF_ADDR); // set time out value to seconds
outb(inb(CONF_DATA)|0x80, CONF_DATA);
outb(0x73, CONF_ADDR); //set time out:
outb(0x03, CONF_DATA); //0x03 -> 3 seconds
printf("Watchdog enabled. Press CTRL+C within 5 seconds to stop disarming.\n");
for(i=0; i<5; i++)
{
outb(0x73, CONF_ADDR); //reset time out
outb(0x03, CONF_DATA);
printf(".");
fflush(stdout);
sleep(1);
}
outb(0x73, CONF_ADDR);
outb(0x00, CONF_DATA); //deactivate watchdog
printf("\nWatchdog disabled\n");
iopl(0);
return 0;
}
TME-104P-CSR-LX800-R1V11.doc
Rev 1.11
44 (50)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents