Wdt Sample Code - MSI MS-98I8 Manual

Industrial computer board
Table of Contents

Advertisement

WDT & GPIO

WDT Sample Code

SIO_INDEX_Port
SIO_DATA_Port
SIO_UnLock_Value
SIO_Lock_Value
WatchDog_LDN
WDT_UNIT
WDT_Timer
Sample code:
;Enable config mode
mov
dx, SIO_INDEX_Port
mov
al, SIO_UnLock_Value
out
dx, al
jmp
short $+2
jmp
short $+2
out
dx, al
;Change to WDT
mov
dx, SIO_INDEX_Port
mov
al, 07h
out
dx, al
mov
dx, SIO_DATA_Port
mov
al, WatchDog_LDN
out
dx, al
;Acive WDT
mov
dx, SIO_INDEX_Port
mov
al, 30h
out
dx, al
mov
dx, SIO_DATA_Port
in
al, dx
or
al, 01h
out
dx, al
;set timer
mov
dx, SIO_INDEX_Port
mov
al, 0F6h
out
dx, al
mov
dx, SIO_DATA_Port
mov
al, WDT_Timer
out
dx, al
;set UINT
mov
dx, SIO_INDEX_Port
mov
al, 0F5h
out
dx, al
mov
dx, SIO_DATA_Port
mov
al, WDT_UNIT
out
dx, al
;enable reset
mov
dx, SIO_INDEX_Port
mov
al, 0FAh
out
dx, al
mov
dx, SIO_DATA_Port
in
al, dx
or
al, 01h
out
dx, al
;close config mode
mov
dx, SIO_INDEX_Port
mov
al, SIO_Lock_Value
out
dx, al
A-2
equ 04Eh
equ 04Fh
equ 087h
equ 0AAh
equ 007h
equ 60h
;60h=second, 68h=minute, 40h=Disabled Watchdog timer
equ 30
;ex. 30 seconds
;Io_delay
;Io_delay

Advertisement

Table of Contents
loading

Table of Contents