NAR-5050/5070 Series User
’
s Manual
28
sub dx,bx
; dx back to I/O base Addr.
;
Enable WDT Step 7 : Enable SW_WD_TREN ( Offset-12h_Bit7P1 )
; Allow S/W to trigger WDT
xor bx,bx
mov bl,WDCFG
add dx,bx
; Point to WDCFG offset
in al,dx
; Read this I/O port value first
or al,80h
; WDCFG_bit7P1. ( Set SW_WD_TREN )
out dx,al
sub dx,bx
; dx back to I/O base Addr.
;
Enable WDT Step 8 : Enable SW_WD_TRG ( Offset-10h_Bit7P1 )
; Reload Twd,and start count down.
xor bx,bx
mov bl,WDCTL
add dx,bx
; Point to WDCTL offset
in al,dx
; Read this I/O port value first
or al,80h
; WDCTL_bit7P1. ( Set SW_WD_TRG )
out dx,al
sub dx,bx
; dx back to I/O base Addr.
pop bx
pop cx
pop ax
pop dx
ret
WDT enable ENDP
Refresh WDT
; Index_IO_Port dw 002Eh
; Data_IO_Port
dw 002Fh
; SWC_LDN db 04h
; SIOCFG2
db 22h
; WDCTL
db 10h
; WDTO
db 11h
; WDCFG
db 12h
;
; Input : DH ; Twd, the Time-out period 0 --> 255 Minutes,
;
; Return : None
WDT refresh PROC near