ST STM8L1528-EVAL User Manual Download Page 13

UM1000

Demonstration applications

Doc ID 17964 Rev 1

13/23

The STM8L15x remains in WFI mode unless joystick 

SEL

 is pressed. The MCU then 

exits from WFI 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 21.

Exit from WFI with EXTI message

Note:

If an alarm occurs when the system is in WFE mode, it is delayed until the EXTI interrupt 
wakes up the device; then all LEDs are ON and a sound is played for ~10s.

The RTC alarm is used to wake up the STM8L15x from WFI mode.

The LEDs blink until 

SEL 

is pressed from the WFI menu (see 

Figure 22

). The system 

then enters WFI mode and the following message is displayed on the LCD:

Figure 22.

WFI wait for alarm message

When the alarm time is reached, the system exits from WFI mode, the system clock 
frequency is set to 16 MHz, and the application execution resumes. The message 
shown in 

Figure 23

 is then displayed on the LCD screen:

Figure 23.

Exit from WFI with alarm message

3.7.3 

Wait for event mode

This menu allows to put the STM8L15x in Wait for event mode (WFE). The software 
executes the specific sequence of instructions required to enter WFE mode: the CPU clock 
is stopped, and selected peripherals go on running.

In this demonstration, there are two ways to exit from WFE mode:

An external interrupt (EXTI) generated by pressing joystick 

SEL 

exits

 

the STM8L15x 

from WFE mode.

The LEDs blink until

 

SEL

 is pressed from the WFE menu (see 

Figure 24

). The system 

then enters WFE mode and the following message is displayed on the LCD:

Figure 24.

WFE wait for EXTI message

WFI Mode

Exit: EXTI

WFI Mode

Wait for ALARM

WFI Mode

Exit: RTC ALARM

Exit: EXT Event

Press SEL

www.BDTIC.com/ST

Summary of Contents for STM8L1528-EVAL

Page 1: ...stored in the Flash program memory of the microcontroller The firmware is based on the STM8L15x firmware library and provides an example of how to use this library It is divided into various smaller...

Page 2: ...e time 7 3 4 2 Setting the date 8 3 4 3 Setting the alarm 9 3 5 Thermometer demo 10 3 6 IDD measurement demo 11 3 7 Low power demo 12 3 7 1 Run mode 12 3 7 2 Wait for interrupt mode 12 3 7 3 Wait for...

Page 3: ...nt the keywords in bold indicate user actions on the joystick 5 way switch and the RV3 potentiometer The present document follows the conventions shown in Table 1 Up Up Up Up Up Up Left Right Left Rig...

Page 4: ...menu items on the left SEL Enters submenu UP Exits from a submenu 2 4 STM8L1528 EVAL board jumper configuration To be able to run the STM8L1528 EVAL demo correctly configure the following STM8L1528 EV...

Page 5: ...part of the demonstration firmware STM8L1528 Welcome message Main menu HELP HELP CALENDAR Date THERMOMETER About Adjust Show Time Adjust Show Alarm Adjust Show Low Power Audio Audio Player Voice Recor...

Page 6: ...sage The main menu is then activated and the message shown in Figure 4 is displayed Figure 4 Main menu 3 3 Help mode Pressing SEL from the main menu enters the Help mode The following messages are dis...

Page 7: ...displayed to show the current time value see Figure 6 2 Enter the first digit of the hour field Pressing the joystick UP increments the current digit value Pressing the joystick DOWN decrements the cu...

Page 8: ...digit value Pressing the joystick DOWN decrements the current digit value The digit value is limited to a range depending on the date field month day or year 3 After selecting the digit value press SE...

Page 9: ...is displayed Figure 10 Alarm Adjust message Alarm show Select the Alarm show option to display the current alarm After power up the default alarm time 00 00 00 is displayed till the Alarm adjust optio...

Page 10: ...When the joystick RIGHT is pressed the temperature in degrees Fahrenheit is displayed on LCD screen as shown in Figure 14 for two seconds then the temperature in degrees Celsius is displayed again Fi...

Page 11: ...own in Figure 16 is displayed Figure 16 Temperature sensor error message 3 6 IDD measurement demo The STM8L15x microcontroller features an ADC peripheral It measures the IDD current in Run mode by usi...

Page 12: ...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...

Page 13: ...hen the alarm time is reached the system exits from WFI mode the system clock frequency is set to 16 MHz and the application execution resumes The message shown in Figure 23 is then displayed on the L...

Page 14: ...e system exits from WFE mode and the application execution resumes The message shown in Figure 27 is then displayed on the LCD screen Figure 27 Exit from WFE with comparator interrupt message Note If...

Page 15: ...upt wakes up the device then all LEDs are ON and a sound is played for 10s The RTC alarm wakes up the MCU from Active halt mode The LEDs blink until SEL is pressed from the Active halt menu see Figure...

Page 16: ...Halt mode the system clock is set to 16 MHz and the application execution resumes The following message is displayed on the LCD Figure 33 Exit from Halt with EXTI message A Comparator 1 interrupt can...

Page 17: ...the following message is displayed on the LCD screen Figure 36 Start voice recorder message This message remains displayed until SEL is pressed The STM8L15x then starts erasing the voice data previous...

Page 18: ...bmenu by pressing the SEL on the joystick The following message remains displayed unless SEL is pressed Figure 41 Audio Player menu message When SEL is pressed the STM8L15x starts playing the voice an...

Page 19: ...time of sampling Sample rate may be 8000 11025 22050 or 44100 Hz Bits Per Sample 8 bit Audio sample data values are in the range 0 255 Number of Channels 1 Mono The maximum wave files number that can...

Page 20: ...and the menu shown in Figure 47 is displayed When the audio stream is stopped the stream position is reset and the menu shown in Figure 44 is displayed Note If the SD card is removed the demo will sto...

Page 21: ...folder to your own SD memory 4 2 Programming the demonstration To upgrade the demonstration firmware running on your board perform the following steps 1 Download the latest version of STM8L1528 EVAL d...

Page 22: ...mo ADC1 IDD measurement Voice recorder DAC Audio Player COMP 1 Low power External interrupts EXTI Low Power GPIO All demo Clock controller All demo I2C1 Thermometer Audio Player TIM1 Voice recorder TI...

Page 23: ...OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRES...

Reviews: