beautypg.com

NEXCOM nROK 500 User Manual

Page 41

background image

28

Appendix B: Watchdog Timer

Copyright © 2012 NEXCOM International Co., Ltd. All rights reserved

nROK 500 User Manual

===============================================
SetupWDT PROC

mov

dx, 2eh

mov

al, 087h

out

dx, al

nop
nop

mov

al, 01h

out

dx, al

nop
nop

mov

al, 55h

out

dx, al

nop
nop

out

dx, al

;Write operations to special address

port (2E) for entering MB PnP Mode.

mov

al, 07h

out

2eh, al

mov

al, 08h ;Select logical device for Watch Dog.

out

2fh, al

ret
SetupWDT ENDP

===============================================
TimeBaseWDT

PROC

mov

al, 72h

out

2eh, al

mov

al, 40h ;Set WDT reset upon KBRST#

or

al, 00h ;Here!! set 00h for second, set 80h for minute

out

2fh, al

ret
TimeBaseWDT ENDP

===============================================
TimeCountWDT PROC

mov

al, 73h ;WDT Time-out register.

out

2eh, al

mov

al, 03h ;Here!! Set count 3.

out

2fh, al

ret
TimeCountWDT ENDP

===============================================
ExitSetup

PROC

mov

dx, 2eh

mov

al, 0AAh

out

dx, al

ExitSetup

ENDP

===============================================

c:\>debug [enter]
-o 2e 87 ;Enter the Extended Function Mode
-o 2e 01
-o 2e 55
-o 2e 55
-o 2e 07 ;Logical Device Number Reg
-o 2f 07 ;LDN=7
-o 2e 72 ;Watch dog configuration
-o 2f XX ;minute mode (-o 2f 00 second mode)
-o 2e 73 ;LSB for Watch dog tme out value