cstm32sleepstandby

Variables in low power modes


I am wondering what happens for variables & their content after STM32 mcu enters low power mode or exit from it? for example in sleep mode or standby. do their content remove or survived?

best!


Solution

  • You can preserve or not - it is usually (depending on the mode) up to the programmer. Memory consumes power so very often it is more energy efficient to reinitialize RAM after wake up (I do it sometimes in my projects)

    Example: STM32L476:

    enter image description here enter image description here