English
Language : 

AN3404 Datasheet, PDF (12/30 Pages) STMicroelectronics – Low power considerations for STM8TL5xxx devices
Low power modes
Figure 2. STM8TL5xxx architecture
AN3404
)NSTRUCTION
MEM ORY
AND
$ATA
%%02/-
 BIT
2!-
 BIT
0ERIPHERALS  BIT
-EMORY
CONTROLLER
) "US
$ "US
34-CORE
$EBUG
37)-
)NTERRUPTCON TROL
)4# )NTERRUPT
37)-PRO TOCOL
AIB
4.6
4.6.1
1. Legend: I-Bus = instruction bus, D-Bus = databus, SWIM = single wire interface module; ITC = interrupt
controller
Wait mode
The STM8TL5xxx devices support two different Wait modes: Wait for interrupt (WFI) and
Wait for event (WFE). Both modes are designed to reduce STM8TL5xxx device power
consumption by switching off the core when it is not used. Wait mode is mainly used when
the STM8TL5xxx is waiting for an external or internal event so that the program execution
can continue.
The polling loop on an associated peripheral flag can be efficiently replaced by a wait
instruction (WFI() or WFE()) after having correctly configured the interrupt related to this flag
or the event in the WFE register.
Wait mode can be combined with peripheral clock gating and a low-speed clock source to
further reduce the power consumption of the device.
Wait mode also offers the lowest wakeup time which is interesting for applications
requesting a fast response time.
Entering Wait mode
Wait mode is entered by executing the WFI or WFE assembly instruction. This stops the
CPU, but other peripherals and the interrupt controller can continue to run. When entering
Wait mode, the global interrupts are automatically enabled.
● Before entering WFI mode, at least one interrupt must be enabled.
● Before entering WFE mode, at least one event source must be enabled.
12/30
Doc ID 018847 Rev 3