4 timeout status & reset watchdog - index 3ch, 5 programming watchdog - basic operation, 1) unlock configuration register – Acrosser AR-B1320 User Manual
Page 35: 2) lock configuration register, 3) read the value in the configuration register, Timeout status & reset watchdog - index 3ch -15, Programming watchdog - basic operation -15
A
A
R
R
-
-
B
B
1
1
3
3
2
2
0
0
U
U
s
s
e
e
r
r
’
’
s
s
G
G
u
u
i
i
d
d
e
e
3.15.4
TIMEOUT STATUS & RESET WATCHDOG - INDEX 3CH
0: Timer timeout not happened
Bit 7(read only)
1: Timer timeout happened
Bit 6
Write this bit “1” to reset timer
Bit 0-5
The value on this bit has no meaning.
Other function. Please do not modify these
bits.
3.15.5 PROGRAMMING WATCHDOG - BASIC OPERATION
If you would like to access the M6117C configuration register, you need to unlock the register at
first and lock it again after finishing the operation.
(1) Unlock Configuration Register
Mov al,
13h
Out 22h,
al
Nop
Nop
Mov al,
0c5h
Out 23h,
al
Nop
Nop
(2) Lock Configuration Register
Mov al,
13h
Out 22h,
al
Nop
Nop
Mov al,
00h
Out 23h,
al
Nop
Nop
(3) Read the Value in the Configuration Register
Example 1: Read data from INDEX 3Ch
Unlock_Cfg_Reg
;Unlock configuration register
Mov
al, 3ch
;Points to index 3ch
Out 22h,
al
Nop
Nop
In
al, 23h
;Read out
Nop
Nop
Push
ax
;Save to stack
Lock_Cfg_Reg
;Lock configuration register
Pop
ax
;Restore ax and result in al register
3-15