4.5 Watchdog Programming
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. In order
to read back the watchdog event read Bit 0 of Watchdog status register 71h in LDN7.
The following program in C is an example how to test Watchdog function under DOS.
This routine is meant to be compiled using gcc under Linux.
#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 (fix sequence:
outb(0x01, CONF_ADDR);
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 resetting.\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-104-CLR-LX800-R1V3.doc
// 0x87,0x01,x055,0x55)
Rev. 1.3
47(53)