
HT49RA0/HT49CA0
Rev. 1.50 12 March 20, 2014
Power Down Operation -HALT
The HALT mode is initialized by the ²HALT²instruction
and results in the following.
·The system oscillator turns off but the WDT OSC
keeps running (if the WDT oscillator or the real time
clock is selected).
·The contents of the on-chip RAM and of the registers
remain unchanged.
·The WDT is cleared and start recounting (if the WDT
clock source is from the WDT oscillator or the real time
clock oscillator).
·All I/O ports maintain their original status.
·The PDF flag is set but the TO flag is cleared.
The system quits the HALT mode by an external reset,
an interrupt, an external falling edge signal on port B, or
a WDT overflow. An external reset causes device initial-
ization, and the WDT overflow performs a ²warm reset².
After examining the TO and PDF flags, the reason for
chip reset can be determined. The PDF flag is cleared by
system power-up or by executing the ²CLR WDT²in-
struction, and is set by executing the ²HALT²instruction.
On the other hand, the TO flag is set if WDT time-out oc-
curs, and causes a wake-up that only resets the program
counter and Stack Pointer, and leaves the others at their
original state.
The port B wake-up and interrupt methods can be con-
sidered as a continuation of normal execution. Each bit
in port B can be independently selected to wake-up the
device by option. Awakening from an I/O port stimulus,
the program resumes execution of the next instruction.
On the other hand, awakening from an interrupt, two se-
quences may occur. If the related interrupt is disabled or
the interrupt is enabled but the stack is full, the program
resumes execution at the next instruction. But if the in-
terrupt is enabled, and the stack is not full, the regular in-
terrupt response takes place.
When an interrupt request flag is set before entering the
²HALT²status, the system cannot be awaken using that
interrupt.
If wake-up events occur, it takes 1024 tSYS (system
clock period) to resume normal operation. In other
words, a dummy period is inserted after the wake-up. If
the wake-up results from an interrupt acknowledgment,
the actual interrupt subroutine execution is delayed by
more than one cycle. However, if the Wake-up results in
the next instruction execution, the execution will be per-
formed immediately after the dummy period is finished.
To minimize power consumption, all the I/O pins should
be carefully managed before entering the HALT status.
When at HALT state and fS=fSYS/4, LCD and RTC will be
turned off no matter the bit value of (LCDEN, RTCEN).
Reset
There are three ways in which reset may occur.
·RES is reset during normal operation
·RES is reset during HALT
·WDT time-out is reset during normal operation
The WDT time-out during HALT differs from other chip
reset conditions, for it can perform a ²warm reset²that
resets only the program counter and stack pointer and
leaves the other circuits at their original state. Some reg-
isters remain unaffected during any other reset condi-
tions. Most registers are reset to the ²initial condition²
once the reset conditions are met. Examining the PDF
and TO flags, the program can distinguish between dif-
ferent ²chip resets².
Note: ²*²Make the length of the wiring, which is con-
nected to the RES pin as short as possible, to
avoid noise interference.
TO PDF RESET Conditions
0 0 RES reset during power-up
u u RES reset during normal operation
0 1 RES Wake-up HALT
1 u WDT time-out during normal operation
1 1 WDT Wake-up HALT
Note: ²u²means unchanged
To guarantee that the system oscillator is started and
stabilized, the SST (System Start-up Timer) provides an
extra-delay of 1024 system clock pulses when the sys-
tem awakes from the HALT state. Awaking from the
HALT state, the SST delay is added.
An extra SST delay is added during the power-up period
and any wakeup from the HALT may enable only the
SST delay.
The functional unit chip reset status is shown below.
Program Counter 000H
Interrupt Disabled
Prescaler, Divider Cleared
WDT, RTC,
Time base
Cleared. After master reset,
WDT starts counting
Timer/Event Counter Off
Input/output ports Input mode
Stack Pointer Points to the top of the stack