SYS-ITX-N-3800/Setup
v1.0
www.winsystems.com
Page 12
7.5
Reset CMOS BIOS Configuration
Jumpers can be used to reset the BIOS CMOS settings to the factory
default. Enable/disable the Clear CMOS Function hardware circuit, by
placing or removing the jumper from JP7 or JP8 as needed. See “Reset
CMOS BIOS Configuration” on page 33 for usage.
static unsigned char Read_EC (unsigned char address)
{
unsigned char data;
IBF_Check ();
outportb (EC_CMD, EC_CMD_READ);
IBF_Check ();
outportb (EC_DATA, address);
OBF_Check();
data = inportb (EC_DATA);
return data;
}
void EC_WDT_Trigger ()
{
/* WDT Counter */
Write_EC (WDT_SEC, 0x05);
/* if use minute mode */
/* Write_EC (WDT_MIN, 0x05); */
/* 0x01 is second mode */
/* 0x03 is minute mode */
Write_EC (WDT_MODE, 0x01);
}
Write_EC ((b->wdt.ec.count_m_addr & 0xFF), b->wdt.ec.timeout);
Write_EC ((b->wdt.ec.cfg_addr & 0xFF), 0x03); // WDTCFG[1:0]=11
int main ()
{
int i;
EC_WDT_Trigger ();
for (i = 0; i < 5; i++)
{
printf ("Reset counter ...................%d\n", 5 - i);
delay (1000);
}
return 0;
}