13
When the power of HS-5010 is turned on, the Watch-Dog Timer is
disabled. The Watch-Dog Timer can be enabled by reading the Watch-Dog
Timer enable/refresh control port
(
443H
)
and disabled by reading the
Watch-Dog Timer disable control port
(
43H
)
. After the Watch-Dog Timer
is enabled, the user must constantly refresh the Watch-Dog Timer by
reading the Watch-Dog Timer enable/refresh port
(
443H
)
every 1, 2, 10, 20,
110 or 220 seconds. If the user fails to do so or the system hangs, the
Watch-Dog timer will automatically reset the system or issue a NMI
(
Non-maskable interrupt
)
.
The Watch-Dog Timer is controlled by two I/O ports.
443H
I/O Read
Enable/refresh the Watch-Dog Timer.
043H
I/O Read
Disable the Watch-Dog Timer.
The following program are the examples of how to enable, disable and
refresh the Watch-Dog Timer
:
WDT_EN_RF
EQU
0433H
WDT_DIS
EQU
0043H
WT_Enable
PUSH
AX
; keep AX DX
PUSH
DX
MOV
DX,WDT_EN_RF
; enable the watch-dog timer
IN
AL,DX
POP
DX
; get back AX, DX
POP
AX
RET
WT_Refresh
PUSH
AX
; keep AX, DX
PUSH
DX
MOV
DX,WDT_ET_RF
; refresh the watch-dog timer
IN
AL,DX
POP
DX
; get back AX, DX
POP
AX
RET
WT_DISABLE
PUSH
AX
PUSH
DX
MOV
DX,WDT_DIS
; disable the watch-dog timer