56
CA-RU150R30XG-3965U-01-W10
User’s Manual
7
.
Watchdog Timer – WDT
Watchdog Timer – WDT The base address (WDT_BASE) of WDT configuration registers is 0xA10.
◆
Set WDT Time Unit
val = Inportb (WD 0x05); // Read current WDT setting
val = val | 0x08; // minute mode. val = val & 0xF7 if second mode
Outportb (WD 0x05, val) ; // Write back WDT setting
7Set WDT Time
Outportb (WD 0x06, Time); // Write WDT time, value 1 to 255.
Enable WDT
val = Inportb (WD 0x0A); // Read current WDT_PME setting
val = val | 0x01; // Enable WDT OUT: WDOUT_EN (bit 0) set to 1.
Outportb (WD 0x0A, val); // Write back WDT setting.
val = Inportb (WD 0x05); // Read current WDT setting
val = val | 0x20; // Enable WDT by set WD_EN (bit 5) to 1.
Outportb (WD 0x05, val); // Write back WDT setting.