cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L152 can't enter in ''low power run'' mode

Vivek Shinde
Associate
Posted on September 14, 2017 at 11:01

Hi,

I am using STM32L152 in my project.

I have configured MSI clock to run at 2 MHz at startup which is fine. I have set power regulator voltage to PWR_REGULATOR_VOLTAGE_SCALE2.

But when I am configuring it to run in LOW POWER RUN mode then it going around 150 uA but then jumps back 1mA. This cycle goes on for ever without staying in low power mode.

I have ensured that there are no interrupts or other events causing this jump and unable to understand why it is not staying the low power mode consuming few hundred uAs while running at 131 Khz.

// set freq to 131KHz

  __HAL_RCC_MSI_RANGE_CONFIG(RCC_MSIRANGE_1);

// configure it to run in low power mode.

HAL_PWREx_EnableLowPowerRunMode();

I tried couple of other combinations as well but its not working, can anybody please help me in executing right sequence of commands to put the microcontroller in low power run mode ?

Regards,

Vivek

#low-power-run #stm32l152
2 REPLIES 2
Posted on September 14, 2017 at 12:21

Is SysTick being used?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Vivek Shinde
Associate
Posted on September 15, 2017 at 03:21

Hi Clive,

Thanks for your reply.

Yes, SysTick is being used with TIM5 as a source. But even if I suspend it and disable TIM5 clock, not staying in low power run mode.

__HAL_RCC_TIM5_CLK_DISABLE();

HAL_SuspendTick();

Also, I tried to disable interrupts as well but no change.

HAL_NVIC_DisableIRQ(TIM5_IRQn);

HAL_NVIC_DisableIRQ(SysTick_IRQn);

Regards,

Vivek