Manual Number: 00650-144-1
Page 18
PCI-WDT 500/501 Manual
despite the lockup. It is possible to modify the host program to enable the ISR to detect such loops
(perhaps by checking the return stack location for the ISR each time, and making sure it changes).
However, if the code is going to be modified, the next, hybrid, method might be more effective.
This method does, however, allow off-the-shelf existing programs to be used with PCI-WDT50x
without modification. Also, this method could cause spurious resets if your program disables inter-
rupts for an extended duration. The IRQ that would have caused the ISR might be missed and allow
the counter to time out. If the counter counts-down the reset signals will be generated and the
counters will restart.
Combination Reset Mode
By combining the two methods (Foreground and Background) it is possible to create a very
elaborate scheme for monitoring the status of the computer. This combined method eliminates the
negatives associated with either method used individually, but does require extensive modifica-
tions to existing code, or even rewriting code entirely. In this scheme, both foreground and back-
ground routines can prompt the watchdog.
The foreground routine would prompt the watchdog under normal conditions, and the ISR running
in the background would only prompt the watchdog if the foreground routine failed to do so. The
ISR, noting that the foreground routine missed its prompt, could take steps to determine why, and
even try to correct it. For example, the foreground program can post its current status to a shared-
memory variable, indicating that it is about to enter a long dedicated process (calculations for a
print job, perhaps) and that it might miss several of its prompts. The ISR, when executed by the
warning IRQ, notes that the foreground program indicated it might miss its turn, and starts counting
misses. After prompting the watchdog, it returns control to the foreground process. If the count of
missed prompts gets too high, it could write status to a disk file or serial port, then skip the prompt,
allowing the computer to reset.
Sample Program
The following program is written in Pascal. This program will set up Counter 0 with full scale
(65,535) and Counter 1 with 100 and send out a reset pulse when reaching zero.
{
=============================================================
PASCAL Language Sample #1: SAMPLE.PAS
This program will set up counter 1 with 100, and counter 0
with full scale (65535) sending out a pulse at zero.
=============================================================
}
USES
Crt;
CONST
ADDRESS : WORD = $350; {The Base address of the watchdog board.}
procedure CtrMode(cntr,mode:byte);
var ctrl:byte;
begin
ctrl := (cntr shl 6) or $30 or (mode shl 1);
port[3] := ctrl;
end;
Содержание PCI-WDT 500
Страница 1: ...Model PCI WDT 500 501 Product Manual MANUAL NUMBER 00650 144 1B...
Страница 3: ...Page iv This page intentionally left blank...
Страница 7: ...Page viii This page intentionally left blank...
Страница 19: ...Manual Number 00650 144 1 Page 10 PCI WDT 500 501 Manual This page intentionally left blank...
Страница 23: ...Manual Number 00650 144 1 Page 14 PCI WDT 500 501 Manual This page intentionally left blank...
Страница 31: ...Manual Number 00650 144 1 Page 22 PCI WDT 500 501 Manual This page intentionally left blank...
Страница 35: ...Manual Number 00650 144 1 Page 26 PCI WDT 500 501 Manual This page intentionally left blank...