cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-L053R8 (Standby Mode)

Nathapol Tanomsup
Associate II
Posted on January 27, 2017 at 04:47

Hello, I got stuck in a power mode on Nucleo-L053R8 for a week. My desire is going to make this board consume an energy lowest as possible when it is on standby mode. I used this code

/*Disable clock to unused peripheral*/

__GPIOC_CLK_DISABLE();

__GPIOH_CLK_DISABLE();

__GPIOA_CLK_DISABLE();

__GPIOB_CLK_DISABLE();

__GPIOD_CLK_DISABLE();

__SYSCFG_CLK_DISABLE();

__PWR_CLK_DISABLE();

SysTick->CTRL=0x00;

HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN2); __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);

HAL_PWR_EnterSTANDBYMode(); 

I got 18 uA on my ammeter but reference manual claims only 0.27 uA so what else do I need to turn off  to get lowest power consumption as possible.

#stm32l0-nucleo
1 ACCEPTED SOLUTION

Accepted Solutions
Khouloud GARSI
Lead II
Posted on January 27, 2017 at 15:01

Hello everyone,

Please refer to the ''PWR_STANDBY'' example provided when downloading the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubel0.html

package:

STM32Cube_FW_L0_V1.8.0\Projects\STM32L053R8-Nucleo\Examples\PWR\PWR_STANDBY0690X00000606ALQAY.png

The Idd=0.29µA; which is with the same as the value on the datasheet.

0690X00000605vRQAQ.png

Khouloud

View solution in original post

18 REPLIES 18
Khouloud GARSI
Lead II
Posted on January 27, 2017 at 08:50

Hello

Tanomsup.Nathapol

,

Try to configure the unused I/O pins in analog mode before entering the low power mode.

I'm giving GPIOA as an example, but try this with all unused pins:

GPIO_InitTypeDef gpio_init_structure;

__HAL_RCC_GPIOA_CLK_ENABLE();

gpio_init_structure.Mode = GPIO_MODE_ANALOG;

gpio_init_structure.Pull = GPIO_NOPULL;

gpio_init_structure.Speed = GPIO_SPEED_LOW;

gpio_init_structure.Pin = GPIO_PIN_All;

HAL_GPIO_Init(GPIOA, &gpio_init_structure);

__HAL_RCC_GPIOA_CLK_DISABLE();

Hope this help.

Khouloud.

Olivier GALLIEN
ST Employee
Posted on January 27, 2017 at 09:38

Hello, 

Check also that you don't enable debug in StandByMode. bit 2 of DBG_CR should be 0. 

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Posted on January 27, 2017 at 09:36

Thanks for helping. If I need to wake STM32L0 with PC13. I should not disable that PC13 pins right? What about '

__HAL_RCC_GPIOC_CLK_DISABLE();

' can I turn off it? (in case of use PC13 to wakeup)
Posted on January 27, 2017 at 09:41

Hi ,

For sure. The clock of the GPIO port should be enabled.Otherwise, you can not use the pin.

Khouloud.

Posted on January 27, 2017 at 09:55

Thanks , 

Khouloud. I am very appreciated. This save my day.

Posted on January 27, 2017 at 10:03

Thanks, Olivier.

Could you explain why DBGMCU_CR_DBG_STANDBY should be 0 ? 

Posted on January 27, 2017 at 10:04

You are always welcome  

Khouloud

martin2399
Associate II
Posted on January 27, 2017 at 11:15

Hi,

I think you should decrease the clock frequency (use

mailto:MSI@65KHz)

 in order to decrease power consumption from your wakeup port. The power consumption is in uA/MHz...

BTW: I am also working on STM32L0 to acheive very low power. At the moment I have 20uA, and LSI/Watchdog on/all ports power on. The current is meassured during 'WFI'...

BR Martin 

Posted on January 27, 2017 at 10:20

In case you enable it this will let some system clocks active in order to allow debugger connection remain alive. 

Thus the consumption will be higher. Hope it clarify

Thanks to let me know if it was the case, or if it was just the GPIO state which explain over consumption.

BR,

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.