BS83A04A-3/BS83A04A-4
8-bit Touch Key Flash MCU
CTRL Register
Bit
Name
R/W
7
�SYSON
R/W
6
5
4
3
2
LVR�
R/W
x
1
0
WR�
R/W
0
—
—
—
—
—
—
—
—
—
—
—
—
LR�
R/W
0
POR
0
Bitꢀ7,2~1ꢀ Decribedꢀinꢀotherꢀsection
Bitꢀ6~3ꢀ
unimplemented,ꢀreadꢀasꢀ"0"
Bitꢀ0ꢀ
WRF:ꢀresetꢀcausedꢀbyꢀWE[4:0]ꢀsetting
ꢀ 0:ꢀnotꢀactive
ꢀ 1:ꢀactive
Thisꢀbitꢀcanꢀbeꢀclearꢀtoꢀ"0",ꢀbutꢀcanꢀnotꢀsetꢀtoꢀ"1".
Watchdog Timer Operation
TheꢀWatchdogꢀTimerꢀoperatesꢀbyꢀprovidingꢀaꢀdeviceꢀresetꢀwhenꢀitsꢀtimerꢀoverflows.ꢀThisꢀmeansꢀ
thatꢀinꢀtheꢀapplicationꢀprogramꢀandꢀduringꢀnormalꢀoperationꢀtheꢀuserꢀhasꢀtoꢀstrategicallyꢀclearꢀtheꢀ
WatchdogꢀTimerꢀbeforeꢀitꢀoverflowsꢀtoꢀpreventꢀtheꢀWatchdogꢀTimerꢀfromꢀexecutingꢀaꢀreset.ꢀThisꢀisꢀ
doneꢀusingꢀtheꢀclearꢀwatchdogꢀinstructions.
Underꢀnormalꢀprogramꢀoperation,ꢀaꢀWatchdogꢀTimerꢀtime-outꢀwillꢀinitialiseꢀaꢀdeviceꢀresetꢀandꢀsetꢀ
theꢀstatusꢀbitꢀTO.ꢀHowever,ꢀifꢀtheꢀsystemꢀisꢀinꢀtheꢀSLEEPꢀorꢀIDLEꢀMode,ꢀwhenꢀaꢀWatchdogꢀTimerꢀ
time-outꢀoccurs,ꢀtheꢀTOꢀbitꢀinꢀtheꢀstatusꢀregisterꢀwillꢀbeꢀsetꢀandꢀonlyꢀtheꢀProgramꢀCounterꢀandꢀStackꢀ
Pointerꢀwillꢀbeꢀreset.ꢀThreeꢀmethodsꢀcanꢀbeꢀadoptedꢀtoꢀclearꢀtheꢀcontentsꢀofꢀtheꢀWatchdogꢀTimer.ꢀ
TheꢀfirstꢀisꢀaꢀWDTꢀreset,ꢀwhichꢀmeansꢀaꢀcertainꢀvalueꢀisꢀwrittenꢀintoꢀtheꢀWE4~WE0ꢀbitꢀfiledꢀexceptꢀ
01010Bꢀandꢀ10101B,ꢀtheꢀsecondꢀisꢀusingꢀtheꢀWatchdogꢀTimerꢀsoftwareꢀclearꢀinstructionsꢀandꢀtheꢀ
thirdꢀisꢀviaꢀaꢀHALTꢀinstruction.
ToꢀclearꢀtheꢀWatchdogꢀTimerꢀisꢀtoꢀuseꢀtheꢀsingleꢀ"CLRꢀWDT"ꢀinstruction.ꢀAꢀsimpleꢀexecutionꢀofꢀ
"CLRꢀWDT"ꢀwillꢀclearꢀtheꢀWDT.
Theꢀmaximumꢀtimeꢀoutꢀperiodꢀisꢀwhenꢀtheꢀ218ꢀdivisionꢀratioꢀisꢀselected.ꢀAsꢀanꢀexample,ꢀwithꢀtheꢀ
LIRCꢀoscillatorꢀasꢀitsꢀsourceꢀclock,ꢀthisꢀwillꢀgiveꢀaꢀmaximumꢀwatchdogꢀperiodꢀofꢀaroundꢀ8ꢀsecondꢀ
forꢀtheꢀ218ꢀdivisionꢀratio,ꢀandꢀaꢀminimumꢀtimeoutꢀofꢀ7.8msꢀforꢀtheꢀ28ꢀdivisionꢀration.
C
R
L
C
R
L
W
T
D
f
S
1
1
s
a
t
g
d
e
v
i
d
i
e
r
S
B
U
W
T
D
T
m
i
-
e
o
W
[
S
:
2
]
0
=
7
s
-
a
t
g
D
e
v
i
d
i
e
r
8
1
1
1
1
1
1
1
8
t
-
-
o
1
M
U
X
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
:
:
:
:
:
:
:
:
0
1
0
1
0
1
0
1
/
2
f
0
/
S
f
f
2
/
S
W
2
S
W
~
0
S
4
/
2
f
1
1
1
(
S
/
f
2
~
S
f
/
2
)
5
6
7
8
/
S
S
S
S
f
f
f
f
/
/
/
Watchdog Timer
Rev. 1.00
ꢇꢄ
�eꢀꢁꢂaꢁꢃ ꢄꢅꢆ ꢄ01ꢇ