
Demonstration applications
UM1000
Doc ID 17964 Rev 1
The STM8L15x remains in WFE mode unless the
SEL button
is pressed. The MCU
then exits from WFE mode, the system clock frequency is set to 16 MHz, and the
application execution resumes. The following message is displayed on the LCD screen:
Figure 25.
Exit from WFE with EXTI message
●
A Comparator 1 interrupt can also exit the STM8L15x from WFE mode
This interrupt is generated when the comparator non inverting input (connected to RV3)
exceeds the internal reference voltage which is set to 1.22 V.
The LEDs blink until
SEL
). The system then
enters WFE mode and the following message is displayed on the LCD:
Figure 26.
WFE wait for comparator interrupt message
When Comparator 1 non inverting input exceeds the internal reference voltage, the
system exits from WFE mode, and the application execution resumes. The message
shown in
is then displayed on the LCD screen:
Figure 27.
Exit from WFE with comparator interrupt message
Note:
If an alarm occurs when the system is in WFE mode, it is delayed until the occurrence of the
wake up event; then all LEDs are ON and a sound is played for ~10s.
3.7.4 Active-Halt
mode
This menu allows to put the STM8L15x in Active-halt mode. The software executes the
specific sequence of instructions required to enter Active-halt mode: the CPU clock is
stopped except for the RTC.
In this demonstration, there are two ways to exit from Active-halt mode:
●
An external interrupt (EXTI) generated by pressing
SEL
on the joystick exits the
STM8L15x from Active-halt mode:
The LEDs continue blinking until
SEL
is pressed from the Active-halt menu (see
). The system then enters Active-halt mode and the following message is
displayed on the LCD:
WFE Mode
Exit:EXT Event
Exit:COMP Event
Rotate RV3
WFE Mode
Exit: COMP Event
www.BDTIC.com/ST