Skip to main content
Nathapol Tanomsup
Associate III
January 27, 2017
Solved

Nucleo-L053R8 (Standby Mode)

  • January 27, 2017
  • 4 replies
  • 3372 views
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
This topic has been closed for replies.
Best answer by Khouloud GARSI
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

4 replies

Khouloud GARSI
ST Employee
January 27, 2017
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.

Nathapol Tanomsup
Associate III
January 27, 2017
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)
Khouloud GARSI
ST Employee
January 27, 2017
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.

Olivier GALLIEN
ST Technical Moderator
January 27, 2017
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.
Nathapol Tanomsup
Associate III
January 27, 2017
Posted on January 27, 2017 at 10:03

Thanks, Olivier.

Could you explain why DBGMCU_CR_DBG_STANDBY should be 0 ? 

Olivier GALLIEN
ST Technical Moderator
January 27, 2017
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.
martin2399
Associate II
January 27, 2017
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 

Nathapol Tanomsup
Associate III
January 27, 2017
Posted on January 27, 2017 at 11:36

Hi,

I use

mailto:MSI@4.2MHz

, I got 16.1 uA but if I use

mailto:MSI@65KHz

, I got 47.3 uA. So confused.
Khouloud GARSI
Khouloud GARSIBest answer
ST Employee
January 27, 2017
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

Nathapol Tanomsup
Associate III
January 30, 2017
Posted on January 30, 2017 at 07:01

Hi, Khouloud

Today, I used an example from

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fmcus-embedded-software%2Fstm32-embedded-software%2Fstm32cube-embedded-software%2Fstm32cubel0.html

package but I got this. I don't think it works fine.

0690X00000603aGQAQ.jpg

Nathapol Tanomsup
Associate III
January 30, 2017
Posted on January 30, 2017 at 08:52

Finally, I got it. Thanks for helping.

0690X00000603aQQAQ.jpg