
A-3
WDT, GPIO, DIO
MS-9A76
WDT Sample Code
1.
Watchdog Timer – WDT
The base address (WDT_BASE) of WDT configuration registers is
0xA10.
1.1
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
1.2
Set WDT Time
Outportb (WD 0x06,
Time
);
// Write WDT time, value 1 to 255.
1.3
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.
1.4
Disable WDT
val = Inportb (WD 0x05);
// Read current WDT setting
val = val & 0xDF;
// Disable WDT by set WD_EN (bit 5) to 0.
Outportb (WD 0x05, val);
// Write back WDT setting.
1.5
Check WDT Reset Flag
If the system has been reset by WDT function, this flag will set to 1.
val = Inportb (WD 0x05);
// Read current WDT setting.
val = val & 0x40;
// Check WDTMOUT_STS (bit 6).
if (val) printf (“timeout event occurred”);
else
printf (“timeout event not occurred”);
1.6
Clear WDT Reset Flag
val = Inportb (WD 0x05);
// Read current WDT setting
val = val | 0x40;
// Set 1 to WDTMOUT_STS (bit 6);
Outportb (WD 0x05, val);
// Write back WDT setting
Summary of Contents for MS-9A76
Page 1: ...i MS 9A76 Industrial Data Machine ...
Page 8: ......
Page 20: ...1 12 Overview Block Diagram MS 9A76 Q170 C236 ...
Page 21: ...1 13 MS 9A76 Motherboard Jumpers JCMOS1 JAT1 JME1 JCOMP1 ...
Page 23: ...1 15 MS 9A76 Mechanical Overview 4 Slot SKU h h System Dimensions ...
Page 24: ...1 16 Overview h h System Dimensions with Wall Mount ...
Page 25: ...1 17 MS 9A76 h h PCI Express Card Dimensions ...
Page 26: ...1 18 Overview ...
Page 27: ...1 19 MS 9A76 h h PCI Card Dimensions ...
Page 28: ...1 20 Overview ...
Page 29: ...1 21 MS 9A76 Mechanical Overview 2 Slot SKU h h System Dimensions ...
Page 30: ...1 22 Overview h h System Dimensions with Wall Mount ...
Page 31: ...1 23 MS 9A76 h h PCI Express Card Dimensions ...
Page 32: ...1 24 Overview h h PCI Card Dimensions ...
Page 35: ...2 3 MS 9A76 4 Remove the top cover from the system ...
Page 45: ...2 13 MS 9A76 10 Route the cables through the cable routing clip ...
Page 51: ...2 19 MS 9A76 4 Connect the fan power connector to the motherboard ...
Page 54: ...2 22 Getting Started 4 Connect the fan power connector to the motherboard ...
Page 58: ......
Page 82: ......