I'm having some problem reaching the said ultra-low power available for the STM32Lxx series. With no active register, the UC should consume around 10 uA, but I can't get it down from 1 mA. The datasheet says to first reduce the frequency, then the core voltage then enter the ultra low power mode as one can no longer program it.

The lines I use to enter the lower power mode are :

RCC_MSICmd(ENABLE); % Activate the Multi-speed internal clock
RCC_MSIRangeConfig(RCC_MSIRange_0); % Reduce to 32 kHz the Multi-speed internal clock
RCC_SYSCLKConfig(RCC_SYSCLKSource_MSI); % The system clock that will be used is the MSI clock.
RCC_HCLKConfig(RCC_SYSCLK_Div512);  % Reduce furthermore the clock frequency
RCC_PCLK1Config(RCC_HCLK_Div16); % Reduce furthermore the clock frequency
PWR_VoltageScalingConfig(PWR_CR_VOS); % Reduce the core voltage
PWR_EnterLowPowerRunMode(ENABLE); % Enter the low power run mode

I'd be very grateful if someone could point me the mistake I am doing.

  • \$\begingroup\$ Are you putting it in sleep or stop mode? \$\endgroup\$ – Voltage Spike Apr 1 at 18:57
  • 1
    \$\begingroup\$ You need to turn off all non-essential peripherals and peripheral clocks, in addition to reducing power to the core. \$\endgroup\$ – TimWescott Apr 1 at 18:59
  • \$\begingroup\$ If I reset the MCU completely, does't it automaticaly turn off all non-essential peripherals? \$\endgroup\$ – Nathaniel Brochu Apr 1 at 21:24
  • \$\begingroup\$ Adding to what @TimWescott said, please see this answer regarding peripheral clocks. \$\endgroup\$ – bitsmack Apr 2 at 5:50
  • \$\begingroup\$ If it's like the other ST processors it'll come out of reset with all peripherals turned off. \$\endgroup\$ – TimWescott Apr 2 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.