Setting The Terminal Count; Strobing The Watchdog; Watchdog Nmi - Intel NetStructure ZT 5504 Manual

System master processor board
Table of Contents

Advertisement

Setting the Terminal Count

The terminal count determines how long the watchdog waits for a strobe before resetting the
hardware. C code for setting the terminal count might look like the following:
#define WD_CSR_IO_ADDRESS 0x79
#define WD_T_COUNT_MASK
#define WD_500MS_T_COUNT
#define WD_1S_T_COUNT
#define WD_250MS_T_COUNT
.
.
.
void SetTerminalCount(void){
unsigned char WdValue;
WdValue = inb(WD_CSR_IO_ADDRESS);
WdValue &= ~ WD_T_COUNT_MASK;
WdValue |= WD_500MS_T_COUNT;
outb(WD_CSR_IO_ADDRESS,WdValue);
}

Strobing the Watchdog

Once the watchdog is enabled, it must be periodically strobed within the terminal count period
to avoid resetting the system hardware. C code to strobe the watchdog might look like the
following:
void StrobeWatchdog(void){
inb(WD_CSR_IO_ADDRESS);
}

Watchdog NMI

When enabled, an NMI precedes a watchdog reset by 250 ms. The NMI generation feature
gives the application 250 ms to perform essential tasks before the hardware is reset. Before
using watchdog NMI, ensure the following:
• The essential task code is included in an interrupt service routine (ISR).
• The ISR is chained to the existing NMI ISR.
• The watchdog NMI is enabled.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
// IO address of the watchdog
0x07
// Bit mask for terminal count bits.
0x01
// Terminal count values . . . .
0x00
//
0x00
//
// Holds watchdog register values.
//
// Get the current contents of the
// watchdog register.
// Mask out the terminal count bits.
// Set the desired terminal count.
// Furnish the watchdog register
// with the new count value.
// A single read is all it takes.
7. Watchdog Timer
48

Advertisement

Table of Contents
loading

Table of Contents