B&B Electronics PC Watchdog Timer Card ATRWDT Bedienungsanleitung Seite 19

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 26
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 18
P104-WDG-CSM User Manual
19
Background Watchdog Mode
An alternative method to refresh the counters that provides some flexibility but potentially
reduces dependability is to use an interrupt service routine (ISR). The card will generate an
interrupt one Counter 0 load value before timeout occurs. If that interrupt is used by a user-
defined ISR, it's possible for that ISR to refresh the counters and, thus, avoid need for the
main program loop to refresh the counters.
There is the possibility of reduced dependability because this method will not detect certain
types of program lock-ups. For example, if the application program were to lock up in a loop
such as "JMP $", the interrupt service routine would never know it and would therefore
continue refreshes 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 the card
without modification. Also, this method could cause spurious resets if your program disables
interrupts 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
modifications to existing code, or even rewriting code entirely. In this scheme, both foreground
and background 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.
Seitenansicht 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 25 26

Kommentare zu diesen Handbüchern

Keine Kommentare