What is a watch dog, How to use the watch dog, Use the system bios int 52h functions – Eurotech Appliances CPU-1461 User Manual

Page 44: How to turn the watch dog on, How to refresh watch dog

Advertising
background image

44

PC/104-Plus – CPU-1461 Module

What is a Watch Dog?

The Watch Dog is a hardware countdown timer (

2-255 sec./min.)

that can be used to automatically restart the

system in case of system or program execution failure.

Once enabled the Watch Dog must be refreshed (reloaded with the starting timeout value) by the application
software before the timeout expires.

If the program execution stops, the application software will not refresh the Watch Dog anymore. A hardware
reset will be generated when the timeout expires.

The Watch Dog is implemented using the National PC87364 SPIO Watch Dog feature.

How to use the Watch Dog

To enable, disable and refresh the Watch Dog you can:

• Use the System BIOS INT52h functions.

• Directly access Watch Dog I/O mapped registers.

Use the System BIOS INT 52h functions

This method can be used only with operating systems that preserve BIOS functions after boot (like DOS).
Watch Dog timeout is fixed at 2 seconds.

How to turn the Watch Dog ON


Make a call to INT52h with AH=00Ch. The Watch Dog will be enabled to a fixed timeout of 2 seconds. Then
the Watch Dog must be periodically (before 2 seconds) refreshed to avoid a hardware reset.

Assembler code example:

MOV

AH,00Ch

INT

052h

How to refresh Watch Dog


Make a call to INT52h with AH=00Eh. The Watch Dog counter will be reloaded with a fixed timeout of 2
seconds.

Assembler code example:

MOV

AH,00Eh

INT

052h

Advertising