11
3.6.
Watchdog
The SBC-FitPC2i implements watchdog timer using 8-bit count-down timer clocked by
1Hz. Watchdog generates system-reset event when the counter reaches zero.
Note: watchdog functionality is available only with BIOS from 21-Jul-2009 or later.
Operation
Using watchdog requires an appropriate driver to be installed before enabling a watchdog
in BIOS. To enable or disable the watchdog enter BIOS Setup (F2), go to "Advanced"
menu and change "Watchdog Timer" option to On/Off accordingly. Once the "Watchdog
Timer" option enabled the timeout can be set 31-255 seconds. Entering setup temporary
disables watchdog operation regardless to current state.
Reference code
/*This code will work in DOS only.*/
void SendData( unsigned char command ,unsigned char data )
{
outp(0x4c,command);
delay(100);
outp(0x48,data);
delay(200);
}
/*Set watchdog timeout.
This function must be called before timeout ends to prevent system reset. */
void EnableWatchd(unsigned char time)
{
SendData(1,1);
SendData(2,time);
}
void DisableWatchd()
{
SendData(1,0);
SendData(2,0);
}