px-lib  0.9.3
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers
Low Power STOP Mode Example

This demonstrates how to put the STM32 into STOP low power mode.

File(s):

The following modules are used:

The STM32 is woken up from low power STOP mode while the 6/NO button is pressed. The LCD displays an incrementing counter value that tracks the number of times that the button has been pressed. The external peripherals (Serial FLASH, LCD and LCD backlight) and specific GPIO pins (SD Card detect, UART2, I2C and UART4) are put into the lowest power state to minimise power consumption.

References:

  1. RM0376: Ultra-low-power STM32L0x2 advanced Arm-based 32-bit MCUs
  2. PM0223: STM32L0 Series and STM32G0 Series Cortex M0+ programming manual
  3. ES0293: STM32L072x8/B/Z device limitations

The reference documents can also be found here for off-line viewing:

px-lib/boards/arm/stm32/px_hero/docs/stm32l072_manual.pdf
px-lib/boards/arm/stm32/px_hero/docs/stm32l0_cortex-m0p_programming_manual.pdf
px-lib/boards/arm/stm32/px_hero/docs/stm32l0_errata.pdf

For more information, see:

  • Digi-Key Low-Power Modes on the STM32L0 Series
  • [1] "6.3 Low-power modes", page 151
  • [1] "13 Extended interrupt and event controller (EXTI)", page 282
  • [2] "2.5 Power management", page 33
  • [3] "2.15 Flash memory wakeup issue when waking up from Stop or Sleep with Flash in power-down mode", page 11
  • [3] "2.1.6 Unexpected system reset when waking up from Stop mode with regulator in low-power mode", page 11
  • [3] "2.1.8 I2C and USART cannot wake up the device from Stop mode", page 12