SN8P2740 Series
ADC, OP-amp, Comparator 8-Bit Micro-Controller
Watchdog timer application note is as following.
Before clearing watchdog timer, check I/O status and check RAM contents can improve system error.
Don‟t clear watchdog timer in interrupt vector and interrupt service routine. That can improve main routine fail.
Clearing watchdog timer program is only at one part of the program. This way is the best structure to enhance the
watchdog timer function.
Example: An operation of watchdog timer is as following. To clear the watchdog timer counter in the top
of the main routine of the program.
Main:
Err:
…
…
JMP $
; Check I/O.
; Check RAM
; I/O or RAM error. Program jump here and don‟t
; clear watchdog. Wait watchdog timer overflow to reset IC.
Correct:
; I/O and RAM are correct. Clear watchdog timer and
; execute program.
MOV
B0MOV
…
A, #5AH
WDTR, A
; Clear the watchdog timer.
CALL
CALL
…
SUB1
SUB2
…
…
JMP
MAIN
SONiX TECHNOLOGY CO., LTD
Page 76
Version 2.0