cancel
Showing results for 
Search instead for 
Did you mean: 

Difference in Low power sleep mode and sleep mode in stm32l053?

AV.9
Associate II

I went through the examples on the ST site which have the direct implementations (not using CubeIDE generated code HAL for GPIO, SystemClock, ... config implementation)

  1. https://github.com/STMicroelectronics/STM32CubeL0/blob/master/Projects/NUCLEO-L053R8/Examples/PWR/PWR_SLEEP/Src/main.c
  2. https://github.com/STMicroelectronics/STM32CubeL0/blob/master/Projects/NUCLEO-L053R8/Examples/PWR/PWR_LPSLEEP/Src/main.c

The only difference is that low power sleep requires to disable the prefetch buffer initially

__HAL_FLASH_PREFETCH_BUFFER_DISABLE(); /* Disable Prefetch Buffer */

and then before going into sleep mode, enable the powerdown during sleep

__HAL_FLASH_SLEEP_POWERDOWN_ENABLE();/* Enable the power down mode during Sleep mode */

are these the only differences? Do I need to disable the __HAL_FLASH_SLEEP_POWERDOWN after i wake the mcu up (there is no function for it and the definition of __HAL_FLASH_SLEEP_POWERDOWN_ENABLE seems sleep mode specific so it seems unlikely that I need to manually disable it)

Are the power consumption differences significant enough if I'm using a UART that's always listening?

I just want to listen to UART all the time and save the data in a buffer and wake up from low power sleep after every timer interval seconds.

3 REPLIES 3
Simon.T
ST Employee

Hello @AV.9​  ,

To be in low power sleep you need to have the MSI in range 1 or 0 and Vcore in range 2. It's write in the Reference manual RM0367 Rev 8 (page 158).

The differences between low power sleep mode and sleep mode are not the flash power down. But it is in SystemClock_Config() and SystemPower_Config(). If you check in these functions you will see the difference.

In this example, they are powered down the flash to maximize the power consumption but it's not mandatory.

In sleep mode you can use UART. But in low power sleep mode you will be limited by 131kHz while in sleep mode you will be limited by 32MHz.

Regards,

Simon TALAS

ssipa.1
Associate II

Different Low Power mode are described in the STM32L Datasheet:

  • Low Power Run : CPU switch to 131KHz clock to save power. Current is down to 6,5uA
  • Sleep Mode : CPU is stopped, Memory & Register are retained, some peripheral stays active.
    • Sleep Mode : CPU is stopped but it can be wake-up by any of the active peripherals. Current is down to 400uA @ 16 Mhz to 1mAh
    • Low Power Sleep Mode : CPU is stopped and the active peripherals are limited and working at reduce frequency. Basically you can program a 32KHz wake-up in this mode. Current is down to 3,2uA
  • Stop Mode: In Stop Mode the CPU core is stopped but the RAM and Register are retained. Most of peripherals are stopped. Wake-up time: 5uS.
    • Stop Mode with RTC : Wake-up is external signal or RTC… Current is down to 0,8uA @ 3V
    • Stop mode w/o RTC : Compare to previous mode the RTC is stopped. Current is down to 0,38uA @ 3V
  • Standby Mode: In standby mode the CPU core is stopped, Registers & RAM are stopped. Only Registers in Standby circuit are preserved.
    • Standby with RTC: Wake-up is external or RTC… Current is down to 0,57uA @ 3V
    • Standby w/o RTC : The RTC is stopped also. Current is down to 0,26uA @ 3V

Thank you very much for the reply. When I try to implement this in cubeIDE using HAL, what is the difference in implementation between sleep and low power sleep