Wdt Config Reg Bit Definition
7 : Reserved
6 : WDT time out Status (Write 1 Clear)
5 : Watch dog counting Enable
4 : Set Output mode (0 Level,1 Edge)
3 : Time Unit (0 : 1sec , 1: 60Sec)
2 : Output Polarity (0 : low active , 1 : High active)
1-0 : (output pulse width of Wdtrst# ,
00 1ms , 01 25ms ,
10 125ms ,11 :5sec)
*/
outb_p ( 0x40 , WDT_IOBASE + WDT_CONFIG);
//Set WatchDog Count Time
outb_p ( Count , WDT_IOBASE + WDT_TIME);
//Start WatchDog Count
outb_p ( 0x20 , WDT_IOBASE + WDT_CONFIG);
//Print Remain Time
while(1)
{
DataBuffer = inb_p ( WDT_IOBASE + WDT_TIME );
printf(" reset in %d sec\n",DataBuffer);
}
return 0;
}
Watchdog Timer
ICO330 Series User's Manual
69
Need help?
Do you have a question about the ICO330 and is the answer not in the manual?
Questions and answers