Watchdog Timer - Wdt - MSI MS-98E6 Manual

(v1.x) industrial computer board
Table of Contents

Advertisement

Example: Get N_GPI6 input value.
GPIO WDT BKL
val = SMBus_ReadByte (0x6E, 0x42);
val = val & (1<<6);
if (val)
else
Watchdog Timer – WDT
2. Watchdog Timer – WDT
The base address (WDT_BASE) of WDT configuration registers is
2.1
Set WDT Time Unit
val = Inportb (WDT_BASE + 0x05);
val = val | 0x08;
Outportb (WDT_BASE + 0x05, val);
2.2
Set WDT Time
MSI Industrial Platform Computing
Outportb (WDT_BASE + 0x06, Time);
2.3
Enable WDT
val = Inportb (WDT_BASE + 0x0A);
val = val | 0x01;
Outportb (WDT_BASE + 0x0A, val);
val = Inportb (WDT_BASE + 0x05);
val = val | 0x20;
Outportb (WDT_BASE + 0x05, val);
2.4
Disable WDT
val = Inportb (WDT_BASE + 0x05);
val = val & 0xDF;
Outportb (WDT_BASE + 0x05, val);
2.5
Check WDT Reset Flag
If the system has been reset by WDT function, this flag will set to 1.
val = Inportb (WDT_BASE + 0x05);
val = val & 0x40;
if (val)
printf ("timeout event occurred");
else
printf ("timeout event not occurred");
2.6
Clear WDT Reset Flag
val = Inportb (WDT_BASE + 0x05);
val = val | 0x40;
Outportb (WDT_BASE + 0x05, val);
3. LVDS Backlight Brightness Control
The LVDS controller support 17 level of backlight brightness value from 0 (30%) to 16
(100%) and it is accessible through SMBus. The associated access method
A-4
(SMBus_ReadByte, SMBus_WriteByte) are provided in part 4.
// Read value from N_GPI6 port through SMBus.
// Read N_GPI6 address (bit 6).
printf ("Input of N_GPI6 is High");
printf ("Input of N_GPI6 is Low");
// Read current WDT setting
// minute mode. val = val & 0xF7 if second mode
// Write back WDT setting
// Write WDT time, value 1 to 255.
// Read current WDT_PME setting
// Enable WDT OUT: WDOUT_EN (bit 0) set to 1.
// Write back WDT setting.
// Read current WDT setting
// Enable WDT by set WD_EN (bit 5) to 1.
// Write back WDT setting.
// Read current WDT setting
// Disable WDT by set WD_EN (bit 5) to 0.
// Write back WDT setting.
// Read current WDT setting.
// Check WDTMOUT_STS (bit 6).
// Read current WDT setting
// Set 1 to WDTMOUT_STS (bit 6);
// Write back WDT setting
0xA10.
2

Advertisement

Table of Contents
loading

Table of Contents