
Demonstration applications
UM1000
Doc ID 17964 Rev 1
3.7
Low power demo
The STM8L15x features five low power modes to achieve the best compromise between low
power consumption, short startup time and available wakeup sources. The objective of the
LOW POWER menu is to demonstrate how to enter the device in these low power modes
and exit with different wakeup sources. Power consumption and startup time optimization
are not targeted by this application.
3.7.1 Run
mode
The
RUN
mode submenu demonstrates the behavior of an application running at different
clock frequencies. The demo controls on-board LEDs that blink at the clock frequency. The
current value of the clock frequency in Run mode is also displayed on the LCD screen (see
).
Figure 19.
Run mode frequency message
The
Run mode
submenu contains four submenu items:
●
8 MHz:
the application runs at 8 MHz.
●
4 MHz:
the application runs at 4 MHz.
●
2 MHz:
the application runs at 2 MHz.
●
16 MHz:
the application runs at 16 MHz.
Press
SEL
to select one of the listed Run mode clock frequency.
Press
UP
to exit from the selected mode and return to the 16 MHz default clock frequency.
3.7.2
Wait for interrupt mode
This menu allows to put the STM8L15x in Wait for interrupt mode (WFI). The software
executes the specific sequence of instructions required to enter WFI mode: the CPU clock is
stopped, and selected peripherals go on running.
In this demonstration, there are two ways to exit from WFI mode:
●
An external interrupt (EXTI) generated by pressing
SEL
on the joystick exits the
STM8L15x from WFI mode:
The LEDs blink until
SEL
is pressed from the WFI menu (see
). The system
then enters WFI mode and the following message is displayed on the LCD:
Figure 20.
WFI wait for EXTI message
Run Mode
8 MHz
Exit: EXTI
Press SEL
www.BDTIC.com/ST