![ICP Electronics NOVA-7895 User Manual Download Page 35](http://html.mh-extra.com/html/icp-electronics/nova-7895/nova-7895_user-manual_614720035.webp)
NOVA-7895 Socket 370 Celeron
TM
& Pentium III
®
Multimedia & Dual Ethernet ,IEEE1394, Embedded Board
67
Appendix A. Watch-Dog Timer
The Watchdog Timer is a device to ensure that standalone systems can
always recover from abnormal conditions that cause the system to crash.
These conditions may result from an external EMI or a software bug.
When the system stops working, hardware on the board will perform a
hardware reset (cold boot) to bring the system back to a known state.
Three I/O ports control the operation of Watch-Dog Timer.
443 (hex)
Write
Set Watchdog Time period
443 (hex)
Read
Enable the refresh the Watchdog Timer.
043/843 (hex)
Read
Disable the Watch-Dog Timer.
Prior to enabling the Watch-Dog Timer, the user should set the time-out
period. The resolution of the timer is 1 second and the range of the timer
is from 1 to 255 sec. You need to send the time-out value to the I/O
port – 443H, and then enable it by reading data from the same I/O port –
443H. This will activate the timer that will eventually time out and reset
the CPU board. To ensure that this reset condition does not occur, the
Watch-Dog Timer must be periodically refreshed by reading the same I/O
port 443H. This must be done within the time-out period, please refer to
the example program. Finally, be sure to disable the Watch-Dog timer by
reading the I/O port -- 843H or 043H, otherwise the system could reset
unconditionally.
A tolerance of at least 5% must be maintained to avoid unknown routines
in the operating system (DOS), such as disk I/O that can be very time-
consuming. Therefore if the time-out period has been set to 10 seconds,
the I/O port 443H must be read within 7 seconds.
NOVA-7895 Socket 370 Celeron
TM
& Pentium III
®
Multimedia & Dual Ethernet ,IEEE1394, Embedded Board
68
Example assembly program:
TIMER_PORT = 443H
TIMER_START = 443H
TIMER_STOP = 843H
;;INITIAL TIMER COUNTER
MOV DX, TIMER_PORT
MOV AL, 8
;;8 seconds
OUT DX, AL
MOV DX, TIMER_START
IN AL, DX
.
;;start counter
W_LOOP:
MOV DX, TIMER_STOP
IN AL, DX
MOV DX, TIMER_START
IN AL, DX
;;restart counter
;;ADD YOUR APPLICATION HERE
CMP EXIT_AP, 0
JNE W_LOOP
MOV DX, TIMER_STOP
IN AL, DX
;;EXIT AP