Appendix A Watchdog Timer
The Watchdog Timer is provided to ensure that standalone systems can always recover from catastrophic conditions that cause the CPU to crash. This condition may have occurred by external EMI or a software bug. When the CPU stops working correctly, hardware on the board will either perform a hardware reset (cold boot) or a
A BIOS function call (INT 15H) is used to control the Watchdog Timer:
INT 15H:
AH – 6FH
AL – 2 : Set the Watchdog Timer’s period
BL :
The
A tolerance of at least 10% must be maintained to avoid unknown routines within the operating system (DOS), such as disk I/O that can be very
Note: when exiting a program, it is necessary to disable the Watchdog Timer; otherwise the system will reset.
Example program:
;INITIAL TIMER PERIOD COUNTER
W_LOOP:
MOV | AX, 6F02H | ;setting the |
MOV | BL, 30 | |
INT | 15H |
|
;
;ADD YOUR APPLICATION PROGRAM HERE
CMP | EXIT_AP, 1 | ;is your application over? |
JNE | W_LOOP | ;No, restart your application |
MOV | AX, 6F02H | ;disable Watchdog Timer |
MOV | BL, 0 | ; |
INT | 15H |
|
; |
|
|
; EXIT |
|
|
; |
|
|
|
| 42 |