Watchdog Timer

The purpose of a watchdog timer function is to restart the system should some mishap occur. Possible problems include: a failure to boot properly; the application software losing control; temporary power supply problems including spikes, surges, or interference; the failure of an interface device; unexpected conditions on the bus; or other hardware or software malfunctions. The watchdog timer helps assure proper start-up after an interruption.

The Little Board/P5x ROM-BIOS supports the board’s watchdog timer function in two ways:

!There is an initial watchdog timer setting, specified using SETUP, which determines whether the watchdog timer will be used to monitor the system boot, and if so, how long the time-out is (30, 60, or 90 seconds).

!There is a standard ROM-BIOS function which may be used by application software to start and stop the watchdog timer function.

The initial time-out should be set (using SETUP) to be long enough to guarantee that the system can boot and pass control to the application. Then, the application must periodically retrigger the timer by reading I/O Port 201h so that the time-out does not occur. If the time-out does occur, the system will respond in a manner determined by how the watchdog timer jumper, W8, is set (see Chapter 2).

The following simple assembly language routine illustrates how to control the watchdog timer using the Ampro ROM-BIOS function that has been provided for this purpose:

;----------------------------------------------------------

; Watchdog timer control program

;----------------------------------------------------------

 

MOV

AH,0C3h

; Watchdog Timer BIOS function

MOV

AL,nn

; Use “00” to disable, “01” to enable

 

 

; timer.

MOV

BX,mm

; Selects time, in seconds

 

 

;(00-FFh; 1-255 seconds)

INT

15h

 

Ampro provides a simple DOS program that can be used from the command line or in a batch program to manage the watchdog timer. It is called WATCHDOG, and is described in the Ampro Common Utilities manual.

2–50

Page 68
Image 68
Ampro Corporation P5X manual Watchdog Timer, 15h