TME-EPIC-HURLX-R3V5.docx
Rev 3.5
Page 24 of 49
3.12
Watchdog
A watchdog is implemented by an internal circuit of the ITE8712 Super I/O. It is accessible through some general-
purpose ports of the Super I/O. controller.
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.
The following C program is an example how to test the Watchdog function. Programming the Watchdog is quite
similar to programming the GPIOs.
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); // puts SIO in configuration mode
outb(0x01, CONF_ADDR); // (fixed sequence: 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;
}
Note
:
Applications MUST NOT CHANGE the watchdog config bits (SIO LDN 7, Index 72h, Bits
6+4), but keep the BIOS's settings to ensure reliable watchdog operation throughout all
board revisions.