ADLINK NuPRO-E72 User Manual
Page 85

Watchdog Timer
73
NuPRO-E72
outportb(IT8783_ioPort+1, registerValue);
outportb(IT8783_ioPort, 0xf8);
outportb(IT8783_ioPort+1, 0x1f);// PLED mapping to
GP37
outportb(IT8783_ioPort, 0xf9);
registerValue = inportb(IT8783_ioPort + 1);
registerValue |= 0x02;
registerValue &= 0xfb;
outportb(IT8783_ioPort+1, registerValue);
}
outportb(IT8783_ioPort, 0x71);
registerValue = inportb(IT8783_ioPort + 1);
registerValue &= 0xfe;
outportb(IT8783_ioPort+1, registerValue);
outportb(IT8783_ioPort, 0x72);
registerValue = inportb(IT8783_ioPort + 1);
registerValue &= 0xdf;
outportb(IT8783_ioPort+1, registerValue);
if(count_value >= 60)
{
outportb(IT8783_ioPort, 0x72);
registerValue = inportb(IT8783_ioPort+1);
registerValue &= 0x8f;
registerValue |= 0x40; //enable WDT output through
PRST
outportb(IT8783_ioPort+1, registerValue); // set
WDT count is minute
tempCount = count_value / 60;
if((count_value%60) > 30)
tempCount++;
if(tempCount > 65535)
tempCount = 65535;
printf("WDT timeout in %d minutes.\n", tempCount);
}
else
{
outportb(IT8783_ioPort, 0x72);