cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 L071CZ consumes high current in stopmode (3.5mA).

Praththanan
Associate II

Hi all,

I am using a custom board designed using mcu STM32 L071CZ. I want my device to go to stopmode afte doing a certain task. I checked the current consumption in run mode, it is almost 4.7mA and in stop mode in 3.56 mA.I haven't enabled any other peripheral in mcu except rtc.(RTC only enabled) . Ihave checked the PCB design, there are no way for current leakages. In data sheet, consumed current is said less than 100 uA.

Code I used for checking.

*******************//code 1 *******************************************************

count=count+1;

HAL_Delay(10000);

//Entering stopmode

HAL_SuspendTick();

HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);

HAL_ResumeTick();

SystemClock_Config();

5 REPLIES 5
Simon.T
ST Employee

Hello @Praththanan​ ,

I checked your code on NUCLEO-L073R. I got the good values, RUN~4mA and STOP~100µA.

How do you want to wakeup the chip ?

On your PCB what is powered ON?

Best regards

LEDs, other peripherals?

What about STANDBY?

Entering WFI loop again after servicing other interrupts?

With/without debugger attached?

Able to output any info/diagnostics via a serial connection to better understand internal states/actions?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi @Simon.T​ , thank you for responding. I tried to power up PCB using battery and tried to power up mcu using 3.3v pin.

in stm32l0xx.it.c.....

void RTC_IRQHandler(void)

{

 /* USER CODE BEGIN RTC_IRQn 0 */

 /* USER CODE END RTC_IRQn 0 */

 HAL_RTCEx_WakeUpTimerIRQHandler(&hrtc);

 /* USER CODE BEGIN RTC_IRQn 1 */

wakeup = wakeup + 1; ## Here initiating a variable and using it in main.c file

 /* USER CODE END RTC_IRQn 1 */

}

I am wake up mcu using this.

Is there any other way to wakeup.

I tried this way also.

HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0xB4AA, RTC_WAKEUPCLOCK_RTCCLK_DIV16);

/

Hi @Community member​ , thank you for replying,

There are no LED working as I didn't enable any peripheral (enabled only RTC).

I have removed the debuggers.

I haven't tried any way to output any info. Can you tell me how can I read without using live expression?

Piranha
Chief II

Before going to the low-power mode, set the DBG_CR register to zero and disconnect the debugger physically.