PC/104-Plus – CPU-1461 Module
45
How to turn the Watch Dog OFF
Make a call to INT52h with AH=00Dh. The Watch Dog will be disabled. Then the Watch Dog doesn’t need to
be periodically refreshed anymore.
Assembler code example:
MOV
AH,00Dh
INT
052h
Directly accessing Watch Dog I/O mapped registers
This method must be used when the operating system you are using doesn’t allow you to use the System
BIOS calls, or when you need a different timeout than 2 seconds.
The following assembler code examples explain how to handle the Super I/O (SPIO) National PC87364
Watch Dog:
IO_SPIO_WDT_BASE EQU 7030h ; National PC87364 SPIO Watch Dog
Use the following code to Enable Watch Dog :
; Configure Watch Dog Mask Register ...
MOV
DX,IO_SPIO_W00001h
; Mask Register
IN
AL,DX
AND
AL,11110000b
;
No
IRQs
refresh
OUT
DX,AL
; Set Time Unit ...
MOV
DX,IO_SPIO_W002h
; Status Register
IN
AL,DX
AND
AL,NOT 10000100b
; Clear Time Unit
OUT
DX,AL
;
Update
Register
; Watch Dog in minutes now
IFDEF TIME_IN_SECONDS
; Add this code to set Watch Dog in seconds …
OR
AL,10000000b
;
Set
Seconds
1
st
step
OUT
DX,AL
;
Update
Register
OR
AL,00000100b
;
Set
Seconds
2
nd
step
OUT
DX,AL
;
Update
Register
ENDIF
; Set Timeout ...