beautypg.com

Appendix b - watchdog sample code, Appendix b appendix b - watchdog sample code – DFI HD101-H81 User Manual

Page 80

background image

www.dfi .com

80

Appendix B Watchdog Sample Code

Appendix B

Appendix B - Watchdog Sample Code

;Software programming example:

;---------------------------------------------

;(1) Enter Super IO Confi guration mode

;---------------------------------------------

MOV DX,4EH

MOV AL,87H

OUT DX,AL

OUT DX,AL

;-------------------------------------------------------------------------------------------

;(2) Confi guration Logical Device 8, register CRF0/CRF1 (WDT Control/WDT

timer)

;-------------------------------------------------------------------------------------------

MOV DX,4EH

MOV

AL,07H

;Ready to Program Logical Device

OUT DX,AL

MOV DX,4FH

MOV

AL,08H

;Select Logical Device 8

OUT DX,AL

MOV DX,4EH

MOV

AL, F1H

;Select watchdog timer register

OUT DX,AL

MOV DX,4FH

MOV

AL,10H

;Set watchdog timer value

OUT DX,AL

MOV DX,4EH

MOV

AL, F0H

;Select watchdog Control Register

OUT DX,AL

MOV DX,4FH

MOV

AL,02H

;Set Watchdog Control Value

OUT DX,AL

;----------------------------------------------------------------

;(1) Exit extended function mode

;----------------------------------------------------------------

MOV DX,4EH

MOV AL,AAH

OUT DX,AL