Page 1 of 1

Reducing the current consumption of STM32L412KB

Posted: Tue Oct 12, 2021 2:07 pm
by niagFT
Hi,

I'm using a the STM32L412KB board in a project, and one of the reasons I picked it is due to its low current consumption.

But then I did some measurements and found out that the consumption is much higher than expected: approximately 16 mA in operation and 600 uA in deep sleep (using the

Code: Select all

LowPower.deepSleep()
function). Those numbers are when supplying the processor directly from CN4.14 with 3.3V (having first removed SB14 and SB9).

I'm thinking that this has to be due to "wrong" configuration of the MCU for this case?

Can someone help me what I need to check?

I will for sure first try and set all unused pins to output LOW or input with pull-down. What is actually the default state of pins?

Should I also look into unused clocks and unused peripherals?
It is a bit difficult for me to find out what is going on in the core. Which files should I look at? Is it everything related to my board under the system and variants folders? The thing is I don't see where do the peripheral clocks get enabled.

I must say I don't have that much experience with STM32 MCUs, so perhaps there are obvious things I'm missing.

Re: Reducing the current consumption of STM32L412KB

Posted: Tue Oct 12, 2021 2:54 pm
by fpiSTM
Well the STM32LowPower library only configure the MCU to enter deepSleep mode but several other configuration can be applied depending of the MCU.
You can refers to application note to see what can be customized to enhance this.

Re: Reducing the current consumption of STM32L412KB

Posted: Tue Oct 12, 2021 3:13 pm
by niagFT
May I ask which application note you are referring to? ;)

But it's also about the current consumption under normal operation. The 16mA is a bit higher than expected, since I'm only using (or put it differently, my application only needs) one hardware USART, one software UART and the ADC.

Re: Reducing the current consumption of STM32L412KB

Posted: Tue Oct 12, 2021 4:01 pm
by MoDu
600 uA in deep sleep
I'm more concerned with this, isn't it still a bit high?

Re: Reducing the current consumption of STM32L412KB

Posted: Tue Oct 12, 2021 4:34 pm
by fpiSTM
Well this one is a good starting point:
https://www.google.com/url?sa=t&rct=j&q ... sluY7KViWL

For example, Shutdown consumption is 8nA w/o RTC and 260nA w/ RTC. OK but in this case:
Typical current consumption for STM32L433 device at VDD = 1.8 V, 25°C. Consumptions values provided running from SRAM, Flash memory Off, 80 MHz in Range 1,
26 MHz in Range 2, 2 MHz in LPRun/LPSleep.

For STM32 core, system core clock config is set to be at the higher frequency. Not executing form RAM, so FLASH is on, Vdd is 3.3V,...

Re: Reducing the current consumption of STM32L412KB

Posted: Wed Oct 13, 2021 5:25 pm
by mrburnette
IMO: STM32duino is not the best choice when doing low-level, low-power projects.

As Arduino is created through wrappers and creative coding tricks, it has some inherent overhead. Rather, the better choice would be to toss Arduino'ish thinking and get down to a professional level of programming rather than running the Arduino port ... use the underlying tools directly.

https://www.st.com/en/development-tools ... tools.html

Re: Reducing the current consumption of STM32L412KB

Posted: Thu Oct 14, 2021 1:16 pm
by ag123
There are many things that consume currents, a 1 k ohm resistor between 3.3v to gnd consumes 3.3 mA even if no other things are connected.
'low power' requires extraordinary efforts to 'switch off' any peripherals not in use. And it'd be necessary to check all other components on board to see if those are after all consuming that current.
For practical purpose I use higher capacity batteries e.g. rechargable NI-MH or Li-Po batteries if space isn't a constraint.

Re: Reducing the current consumption of STM32L412KB

Posted: Fri Oct 15, 2021 2:29 pm
by JimEli
not trying to steal the thread, but what is a good method to measure power consumption?

Re: Reducing the current consumption of STM32L412KB

Posted: Fri Oct 15, 2021 3:25 pm
by fpiSTM
On Nucleo board you have an jumper for IDD measurement. It allows to have only MCU consumption.

Re: Reducing the current consumption of STM32L412KB

Posted: Wed Nov 03, 2021 10:36 pm
by niagFT
I have a small update to this problem. I realized that most of the current consumption was created by the 4 UART pins that were connected to my satellite and GPS modules. By ensuring no current flows through those pins took me far. But I also had to do something more: I had to remove SB2 and SB3, which are the virtual com port tx, rx lines. All in all, after the above described modifications, I ended up with 1.8uA. Not so bad at all I would say...