English
Language : 

AN2857 Datasheet, PDF (14/31 Pages) STMicroelectronics – STM8S and STM8A family power management
Run and low-power modes
AN2857
4.2.3
Activation level/low-power mode control
In a very low-power application, the MCU spends most of the time in WFI/halt mode and is
woken up (through interrupts) at specific moments to execute particular tasks. Some of
these tasks are recurring and short enough to be treated directly in an interrupt service
routine (ISR), rather than returning to the main program. In this case, setting the AL bit
before going to wait mode, ensures the run time/ISR execution is reduced because the
‘context’ (core register content) is not saved/restored each time.
In very simple applications, all operations can be executed in ISR only. In more complex
applications, an interrupt routine may relaunch the main program by resetting the AL bit.
The activation level/low-power mode control feature works only with wait mode. It is not
available for active halt or halt mode.
4.3
Active halt mode
Active halt mode can be defined as a ‘hybrid’ mode between run and halt mode. It is
composed of two phases:
● Halt phase: In this phase, the MCU is in halt mode except that the AWU unit and the
LSI clock are kept running if they are used as the AWU clock source.
● Active phase: In this phase, the MCU is in run mode.
When entering active halt mode, the AWU counters start to run. The AWU interrupt wakes
up the CPU at regular programmed intervals. Once the device is in run mode the AWU
counters are stopped.
Figure 3. Active halt diagram
AWU interrupt
MCU state
AWU time interval
Run
Halt phase
Run
Go to halt mode
ai15046
In active halt mode during halt phase, the user can choose the regulator (either MVR or
LPVR) and the Flash state (either operating or power-down mode). Using the LPVR and
putting the Flash in power-down mode reduces power consumption, but, increases wakeup
time.
Active halt mode is very useful for reducing average consumption of a battery based
application.
14/31
Doc ID 15241 Rev 3