![Fastwel CPB902 User Manual Download Page 86](http://html.mh-extra.com/html/fastwel/cpb902/cpb902_user-manual_546458086.webp)
General Software® BIOS
CPB902
C P B 9 0 2 U s e r M a n u a l
84
© 2 0 0 8 F a s t w e l v . 1 . 5 b E
5.11.3
SuperIO Watchdog Timer Operation
The SuperIO FDC37B787 internal WDT has software adjustable (programmable) timeout period
from 1 second up to 255 minutes. Upon expiry of the timeout the RESET signal is issued by the
WDT, unless it is reset by the user program. Sample program code fragments setting and clearing
the WDT are given below.
//SuperIO configuration register setting function
void write_cfg_reg(BYTE log_dev,BYTE reg_ind,BYTE value)
{
asm{
mov dx,0x370
mov al,0x55
cli
out dx,al
sti
mov dx,0x370
mov al,0x07
out dx,al
mov dx,0x371
mov al,log_dev
out dx,al
mov dx,0x370
mov al,reg_ind
out dx,al
mov dx,0x371
mov al,value
out dx,al
mov dx,0x370
mov ax,0xAA
out dx,al
}
}
//Watchdog timer setup
//WDT timeout variable
wdt_timeout=10;
//WDT timeout in seconds (write to configuration register WDT_UNITS)
write_cfg_reg(0x08,WDT_UNITS,0x80);
//Set GP12 line to work with the WDT (GP12 configuration register)
write_cfg_reg(0x08,GP12,0x0A).
//Reset the WDT in a user program
do
{
//Any actions …
//Write the timeout value to WDT_VAL configuration register
write_cfg_reg(0x08,WDT_VAL,wdt_timeout);
// Any actions …
}while(!Exit);
More details on SuperIO FDC37B787 operation can be found in SuperIO FDC37B787 Data sheet.