Skip to main content
Rob Keck
Associate
August 2, 2017
Solved

STM32L0 standby mode current consumption optimization

  • August 2, 2017
  • 4 replies
  • 2854 views
Posted on August 02, 2017 at 10:52

Hello there.

I am currently developing a coin cell powered device with the STM32L051C8. The datasheet says in standby mode the consumption is about 0.27uA (270nA). My current board only consists of a Voltage Regulator which is rated to max. 300nA self consumption. So the optimum consumption for my device should be around 570-600nA. My current board has consumption of around 800-900nA. So my question: is there a option to optimize the current consumption on software side beside the standard standby entering procedure.

// Enter STBY Mode function. 
void HW_EnterLowPower() {
 hal_deinit();
 __HAL_RCC_PWR_CLK_ENABLE();
 HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);
 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
 HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);
 HAL_PWR_EnterSTANDBYMode();
 }

Thanks in advance,

kind regard, Rob.

#standby #stm32l0 #low-power
This topic has been closed for replies.
Best answer by Imen.D
Posted on August 02, 2017 at 12:20

Hello,

I recommend you to look to the PWR

Current Consumption

examples within STM32CubeL0:

S TM32Cube_FW_L0_V1.9.0\Projects\STM32L073Z_EVAL\Examples\PWR\PWR_STANDBY

/* The voltage scaling allows optimizing the power consumption when the device is

clocked below the maximum system frequency, to update the voltage scaling value

regarding system frequency refer to product datasheet. */

__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);

Have a look to

the 

http://www.st.com/content/ccc/resource/technical/document/application_note/27/58/8e/81/79/fb/4f/ac/DM00108286.pdf/files/DM00108286.pdf/jcr:content/translations/en.DM00108286.pdf

Regards

Imen

4 replies

After Forever
Senior III
August 2, 2017
Posted on August 02, 2017 at 12:17

Make sure RTC, IWDG, LSE, LSI are disabled. Configure the pins in analog input mode. If possible decrease the voltage coming to VDD at least to 1.8V (or down to 1.65V), use the voltage range 3 for VCORE (1.2V). The PVD, POR and PDR are also eating some current. Refer to the datasheet and

http://www.st.com/resource/en/application_note/dm00108286.pdf

.
Imen.DBest answer
ST Technical Moderator
August 2, 2017
Posted on August 02, 2017 at 12:20

Hello,

I recommend you to look to the PWR

Current Consumption

examples within STM32CubeL0:

S TM32Cube_FW_L0_V1.9.0\Projects\STM32L073Z_EVAL\Examples\PWR\PWR_STANDBY

/* The voltage scaling allows optimizing the power consumption when the device is

clocked below the maximum system frequency, to update the voltage scaling value

regarding system frequency refer to product datasheet. */

__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);

Have a look to

the 

http://www.st.com/content/ccc/resource/technical/document/application_note/27/58/8e/81/79/fb/4f/ac/DM00108286.pdf/files/DM00108286.pdf/jcr:content/translations/en.DM00108286.pdf

Regards

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
MGama.2
Associate
June 24, 2021

@Imen DAHMEN​ I have followed the standby PWR example but I got 10 mA consumption in standby mode. Here is my code:

void Enter_Standby_Mode(void)

{

//Disable the RTC alarm external interrupt

HAL_RTC_DeactivateAlarm(&hrtc, RTC_ALARM_A);

/* Check and handle if the system was resumed from StandBy mode */ 

 if(__HAL_PWR_GET_FLAG(PWR_FLAG_SB) != RESET)

 {

  /* Clear Standby flag */

  __HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB); 

 }

  

 GPIO_InitTypeDef GPIO_InitStructure = {0};

/* Enable GPIOs clock */

 __HAL_RCC_GPIOA_CLK_ENABLE();

 __HAL_RCC_GPIOB_CLK_ENABLE();

 __HAL_RCC_GPIOC_CLK_ENABLE();

 __HAL_RCC_GPIOD_CLK_ENABLE();

 __HAL_RCC_GPIOH_CLK_ENABLE();

 __HAL_RCC_GPIOE_CLK_ENABLE();

 GPIO_InitStructure.Pin = GPIO_PIN_All;

 GPIO_InitStructure.Mode = GPIO_MODE_ANALOG;

 GPIO_InitStructure.Pull = GPIO_NOPULL;

 HAL_GPIO_Init(GPIOA, &GPIO_InitStructure); 

 HAL_GPIO_Init(GPIOB, &GPIO_InitStructure);

 HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);

 HAL_GPIO_Init(GPIOD, &GPIO_InitStructure);

 HAL_GPIO_Init(GPIOH, &GPIO_InitStructure);

 HAL_GPIO_Init(GPIOE, &GPIO_InitStructure);

 /* Disable GPIOs clock */

 __HAL_RCC_GPIOA_CLK_DISABLE();

 __HAL_RCC_GPIOB_CLK_DISABLE();

 __HAL_RCC_GPIOC_CLK_DISABLE();

 __HAL_RCC_GPIOD_CLK_DISABLE();

 __HAL_RCC_GPIOH_CLK_DISABLE();

 __HAL_RCC_GPIOE_CLK_DISABLE();

  

 /* The Following Wakeup sequence is highly recommended prior to each Standby mode entry

  mainly when using more than one wakeup source this is to not miss any wakeup event.

  - Disable all used wakeup sources,

  - Clear all related wakeup flags, 

  - Re-enable all used wakeup sources,

  - Enter the Standby mode.

 */

 /* Disable all used wakeup sources*/

 HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);

  

 /* Re-enable all used wakeup sources*/

 HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 20, RTC_WAKEUPCLOCK_CK_SPRE_16BITS);

  

 /* Clear all related wakeup flags */

 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);

  

HAL_SuspendTick();

 /* Enter the Standby mode */

 HAL_PWR_EnterSTANDBYMode();

}

Associate III
May 3, 2024

hi MGama i am also facing the same issues, when i am using the above code, i am also getting 10mA power consumption, how to clear the above issues,