ADE5166_08 AD [Analog Devices], ADE5166_08 Datasheet - Page 34

no-image

ADE5166_08

Manufacturer Part Number
ADE5166_08
Description
Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
Manufacturer
AD [Analog Devices]
Datasheet
ADE5166/ADE5169
TRANSITIONING BETWEEN OPERATING MODES
The operating mode of the ADE5166/ADE5169 is determined
by the power supply connected to V
the power supply, such as when V
V
This section describes events that change the operating mode.
Automatic Battery Switchover (PSM0 to PSM1)
If any of the enabled battery switchover events occur (see the
Battery Switchover section), V
over results in a transition from PSM0 to PSM1 operating mode.
When battery switchover occurs, the analog circuitry used in
the ADE energy measurement DSP is disabled. To reduce power
consumption, the user code can initiate a transition to PSM2.
Entering Sleep Mode (PSM1 to PSM2)
To reduce power consumption when V
V
in the power control SFR (POWCON, Address 0xC5) to shut
down the MCU core. Events capable of waking the MCU can be
enabled (see the 3.3 V Peripherals and Wake-Up Events section).
Servicing Wake-Up Events (PSM2 to PSM1)
The ADE5166/ADE5169 may need to wake up from PSM2 to
service wake-up events (see the 3.3 V Peripherals and Wake-Up
Events section). PSM1 code execution begins at the power-on
reset vector. After servicing the wake-up event, the ADE5166/
ADE5169 can return to PSM2 by setting Bit 4 in the power control
SFR (POWCON, Address 0xC5) to shut down the MCU core.
Automatic Switch to V
If the conditions to switch V
the Battery Switchover section), the operating mode switches to
PSM0. When this switch occurs, the MCU core and the analog
circuitry used in the ADE energy measurement DSP automatically
restart. PSM0 code execution begins at the power-on reset vector.
BAT
BAT
, user code can initiate sleep mode, PSM2, by setting Bit 4
or when V
SWOUT
switches to V
DD
V
(PSM2 to PSM0)
SWOUT
SWOUT
SWOUT
NORMAL MODE
IS CONNECTED TO V
SWOUT
from V
DD
switches to V
SWOUT
PSM0
, alter the operating mode.
SWOUT
switches from V
. Therefore, changes in
BAT
POWER SUPPLY
is connected to
to V
RESTORED
BAT
Figure 36. Transitioning Between Operating Modes
DD
DD
V
. This switch-
SWOUT
occur (see
AUTOMATIC BATTERY
DD
SWITCHOVER
IS CONNECTED TO V
POWER SUPPLY
SLEEP MODE
to
RESTORED
PSM2
Rev. 0 | Page 34 of 148
WAKE-UP
BAT
V
EVENT
SWOUT
Automatic Switch to V
If the conditions to switch V
the Battery Switchover section), the operating mode switches
to PSM0. When this switch occurs, the analog circuitry used in
the ADE energy measurement DSP automatically restarts. Note
that code execution continues normally. A software reset can
be performed to start PSM0 code execution at the power-on
reset vector.
USING THE POWER MANAGEMENT FEATURES
Because program flow is different for each operating mode, the
status of V
bit in the peripheral configuration SFR (PERIPH, Address 0xF4)
indicates the power supply to which V
Table 19). This bit can be used to control program flow on wake-
up. Because code execution always starts at the power-on reset
vector, Bit 6 of the PERIPH SRF can be tested to determine which
power supply is being used and to branch to normal code execution
or to wake up event code execution. Power supply events can
also occur when the MCU core is active. To be aware of the
events that change what V
following guidelines:
An early warning that battery switchover is about to occur is
provided by SAG detection and, possibly. by low V
(see the Battery Switchover section).
For a user-controlled battery switchover, enable automatic battery
switchover on low V
generate the PSM interrupt. When a low V
data backup. Upon completion of the data backup, enable battery
switchover on low V
Enable the battery switchover interrupt (EBSO)
if V
Enable the power supply restored interrupt (EPSR)
if V
BATTERY MODE
IS CONNECTED TO V
SWOUT
SWOUT
PSM1
SWOUT
SERVICING A WAKE-UP EVENT
TO SHUT DOWN CORE AFTER
= V
= V
USER CODE DIRECTS MCU
must be known at all times. The VSWSOURCE
DD
BAT
DCIN
DD
at power-up.
at power-up.
BAT
. Battery switchover occurs 30 ms later.
only. Next, enable the low V
DD
SWOUT
(PSM1 to PSM0)
SWOUT
is connected to, use the
from V
SWOUT
DCIN
BAT
is connected (see
event occurs, start
to V
DD
DCIN
DCIN
occur (see
detection
event to

Related parts for ADE5166_08