3 years, 6 months ago.

NUCLEO-L476RG power consumption problem

I am testing the power consumption of the NUCLEO-L476RG by putting the MCU into STOP2 mode. According to the data sheets I expect 1,5 uA, however the measurement on JP6 shows about 130uA. I use the Nucleo board without any peripherals. I cannot find any power consumers on in the Nucleo 64 schematics.

Has somebody an idea?

Here is the function how I put it into STOP2 power mode.
void STM32L4_Utilities::DeepSleepSTOP2(void) {
	TimMasterHandle.Instance = TIM_MST;
	__HAL_TIM_DISABLE_IT(&TimMasterHandle, TIM_IT_CC2);
	HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
	SetSysClock();
	__HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC2);
}

</pre>

Comment on this question

2 Answers

2 years, 8 months ago.

Also seeing STOP2 current around 130uA at JP6 with current libraries (March 2017).

Is there any other workaround than importing old rev. 102 libraries?

This is working, set up is with HSE (external 8MHz crystal, 80MHz clock). Haven't time to look at the current files now, will do later in the year if its not sorted by then.

https://developer.mbed.org/users/star297/code/mbed-dev-L476/

posted by Paul Staron 07 Mar 2017
3 years, 6 months ago.

You will get 6uA in deepsleep, I use this successfully with Erik's WakeUp:

https://developer.mbed.org/users/Sissors/code/WakeUp/

Try replacing or modifying:

sleep.c

// Request to enter STOP mode with regulator in low power mode
    HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);

in the Mbed library sleep.c with your code.

I get different values, I am using as well Erik's RTC WakeUp code. Here are my results using the Nucleo L476RG:

  • forever loop = 15 mA
  • mbed sleep = 5.6 mA
  • mbed deepsleep = 142 μA
  • HAL_PWREx_EnterSTOP2Mode = 142 μA

Any ideas?

posted by Helmut Tschemernjak 07 May 2016

I check later and see if ST have made any changes that could be the problem. I have the Mbed-Dev library version that works so will keep this and try the latest version.

Edit.....

You are correct, the latest MBED-DEV has broken the sleep modes.

I don't know at what revision it happened, however I will send a bug report.

Edit....

The problem is with the RTC changes in revision 103, if you select and 'switch to' revision 102 it will work.

posted by Paul Staron 07 May 2016

Within mbed I cannot use the rev. 102 because it says device.h not found. Anyways the rev 102 has also the L4 heap and stack address overlap which have been fixed in later versions.

Any ideas how I can do a workaround , even turning off the RTC to verify that lower power consumption works.

posted by Helmut Tschemernjak 07 May 2016

I have just tried it again and 102 is working fine. Are you importing the correct Mbed library:

https://developer.mbed.org/users/mbed_official/code/mbed-dev/

This gave me rev. 123, tested, deepsleep current high. I then 'reverted' to rev. 102, tested, the deepsleep current is correct. I then 'switch' to the rev. 102. The revision in the library details then indicates 102.

posted by Paul Staron 08 May 2016

You need to log in to post a question