HT47C20L
18
January 18, 2000
The system can leave the halt mode by means of
an external reset, an interrupt, an external fall-
ing edge signal on port Aor a WDT overflow. An
external reset causes a device initialization and
the WDT overflow performs a warm reset . Ex-
amining the TO and PD flags, the reason for
chip reset can be determined. The PD flag is
cleared when system power-up or executing the
CLRWDTinstructionandissetwhentheHALT
instruction is executed. The TO flag is set if the
WDT time-out occurs, and causes a wake-up
that only resets the PC and SP, the others main-
tain their original status.
The port A wake-up and interrupt methods can
be considered as a continuation of normal execu-
tion. Each bit in port A can be independently se-
lected to wake up the device by mask option.
Awakening from an I/O port stimulus, the pro-
gram will resume execution of the next instruc-
tion. If awakening from an interrupt, two
sequencesmayhappen.Iftherelatedinterruptis
disabled or the interrupt is enabled but the stack
is full, the program will resume execution at the
next instruction. If the interrupt is enabled and
the stack is not full, a regular interrupt response
takes place.
If an interrupt request flag is set to 1 before en-
tering the halt mode the wake-up function of the
related interrupt will be disabled.
If the wake-up results from an interrupt acknowl-
edgment,theactualinterruptsubroutineexecution
will be delayed by more than one cycle. However, if
the wake-up results in the next instruction execu-
tion, the execution will be performed immediately.
To minimize power consumption, all the I/O pins
should be carefully managed before entering the
halt mode.
Reset
Therearethreewaysinwhicharesetmayoccur.
RES reset during normal operation
RES reset during halt mode
WDTtime-outresetduringnormaloperation
The LVR is enable and the VDD is lower then
V
LVR
The WDT time-out during halt mode is differ-
entfromotherchipresetconditions,sinceitcan
perform a warm reset that just resets the PC
and SP leaving the other circuits in their origi-
nal state. Some registers remain unchanged
during other reset conditions. Most registers
are reset to the initial condition when the re-
set conditions are met. By examining the PD
and TO flags, the program can distinguish be-
tween different chip resets .
TO
PD
RESET Conditions
0
0
System power-up
u
u
RES reset or LVR reset during
normal operation
0
1
RES reset or LVR reset
wake-up from halt mode
1
u
WDT time-out during normal
operation
1
1
WDT wake-up from halt mode
Note: u means unchanged
Toguaranteethatthecrystaloscillatorhasstarted
and stabilized, the SST (system start-up timer)
provides an extra delay of 8192 system clock
pulses when the system powers up.