Rev. 1.10
46
November 04, 2019
Rev. 1.10
47
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
Reset and Initialisation
A reset function is a fundamental part of any microcontroller ensuring that the device can be set
to some predetermined condition irrespective of outside parameters. The most important reset
condition is after power is first applied to the microcontroller. In this case, internal circuitry will
ensure that the microcontroller, after a short delay, will be in a well-defined state and ready to
execute the first program instruction. After this power-on reset, certain important internal registers
will be set to defined states before the program commences. One of these registers is the Program
Counter, which will be reset to zero forcing the microcontroller to begin program execution from the
lowest Program Memory address.
In addition to the power-on reset, another reset exists in the form of a Low Voltage Reset, LVR,
where a full reset is implemented in situations where the power supply voltage falls below a
certain threshold. Another type of reset is when the Watchdog Timer overflows and resets the
microcontroller. All types of reset operations result in different register conditions being setup.
Reset Functions
There are several ways in which a microcontroller reset can occur through events occurring
internally:
Power-on Reset
The most fundamental and unavoidable reset is the one that occurs after power is first applied to
the microcontroller. As well as ensuring that the Program Memory begins execution from the first
memory address, a power-on reset also ensures that certain other registers are preset to known
conditions. All the I/O port and port control registers will power up in a high condition ensuring that
all pins will be first set to inputs.
V
DD
Power-on Reset
SST Time-out
t
RSTD
Note: t
RSTD
is power-on delay specified in System Start Up Time Characteristics.
Power-on Reset Timing Chart
Low Voltage Reset – LVR
The microcontroller contains a low voltage reset circuit in order to monitor the supply voltage of the
device and provides an MCU reset should the value fall below a certain predefined level.
The LVR function can be enabled or disabled by the LVRC control register. If the LVRC control
register is configured to enable the LVR, the LVR function will be always enabled with a specific
LVR voltage V
LVR
in the FAST/SLOW mode. If the supply voltage of the device drops to within a
range of 0.9V~V
LVR
such as might occur when changing the battery in battery powered applications,
the LVR will automatically reset the device internally and the LVRF bit in the RSTFC register
will also be set to 1. For a valid LVR signal, a low supply voltage, i.e., a voltage in the range
between 0.9V~V
LVR
must exist for a time greater than that specified by t
LVR
in the LVR Electrical
Characteristics. If the low supply voltage state does not exceed this value, the LVR will ignore the
low supply voltage and will not perform a reset function. The actual V
LVR
value is fixed at 2.1V by
the
LVS7~LVS0 bits in the LVRC register. If the LVS7~LVS0 bits are changed to some different
values, other than 01011010B and 10100101B, by environmental noise, the LVR will reset the
device after a delay time,
t
SRESET
. When this happens, the LRF bit in the RSTFC register will be set