Appendix
42
EPE1814V2NAR
Appendix
Watchdog Programming Guide
This board provides a programmable watchdog timer (WDT) up to 255 levels and
time by minute or second. Watchdog timer overtime event can be programmed to
reset system or generate maskable interrupts.
The available IRQ numbers for this board are: 3, 4, 5, 7, 9, 10 and 11.
Before using, please modify the corresponding IRQ number in PCIPnP of BIOS
Setup interface into “Reserved”.
The following describes WDT program in C language. The steps to program WDT are
listed as follows:
Ø
Enter WDT programming mode
Ø
Set WDT operating mode/enable WDT/disable WDT
(1)
Enter
WDT
Programming Mode
#define
INDEX_PORT 0x2E
#define
DATA_PORT
0x2F
outportb(INDEX_PORT, 0x87);
outportb(INDEX_PORT, 0x87);
outportb(INDEX_PORT, 0x07);
outportb(DATA_PORT, 0x08);
outportb(INDEX_PORT, 0x30);
outportb(DATA_PORT, 0x01);
(2)
Configure WDT operating mode, reset mode or interrupt mode:
unsigned char oldval;
outportb(INDEX_PORT,0x2d);
oldval = inportb(DATA_PORT);
a.
Configure
WDT
to reset mode