System Installation
WADE-8070 User’s Manual
3-4
3.5
WDT Function
There are two PNP I/O port addresses that can be used to configure WDT,
1) 0x2E:EFIR (Extended Function Index Register, for identifying CR index number)
2) 0x2F:EFDR (Extended Function Data Register, for accessing desired CR)
Below are some example codes, which demonstrate the use of WDT.
// Enter Extended Function Mode
outp(0x002E, 0x87);
outp(0x002E, 0x87);
// Select Logic Device 8
outp(0x002E, 0x07);
outp(0x002F, 0x08);
// Assign Pin 77 WDTO Enable
outp(0x002E, 0x30);
outp(0x002F, inp(0x002F) & 0x01);
// Select Count Mode
outp(0x002E, 0xF5);
outp(0x002F, (inp(0x002F) & 0xF7) | ( Count-mode Register & 0x08));
// Specify Time-out Value
outp(0x002E, 0xF6);
outp(0x002F, Time-out Value Register );
// Disable WDT reset by keyboard/mouse interrupts
outp(0x002E, 0xF7);
outp(0x002F, 0x00);
// Select Logic Device A
outp(0x002E, 0x07);
outp(0x002F, 0x0A);
// Active Logic Device A
outp(0x002E, 0xE7);
outp(0x002F, (inp(0x002F) & 0xF0) | ( Sel WDTO RST Register ));
// Exit Extended Function Mode
outp(0x002E, 0xAA);
Definitions of Variables:
Value of Count-mode Register :
1) 0x00 -- Count down in seconds (Bit3=0)
2) 0x08 -- Count down in minutes (Bit3=1)
Value of Time-out Value Register :
1) 0x00 -- Time-out Disable
2) 0x01~0xFF -- Value for counting down
Value of Sel WDTO RST Register
1) 0x00 -- RST by LPC_RST (Bit3=0)
2) 0x08 -- RST by PWR_OK (Bit3=1)