Reducing the current consumption of STM32L412KB

Post here first, or if you can't find a relevant section!
Post Reply
niagFT
Posts: 7
Joined: Wed Sep 29, 2021 8:18 pm

Reducing the current consumption of STM32L412KB

Post 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.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Reducing the current consumption of STM32L412KB

Post 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.
niagFT
Posts: 7
Joined: Wed Sep 29, 2021 8:18 pm

Re: Reducing the current consumption of STM32L412KB

Post 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.
MoDu
Posts: 16
Joined: Mon Jul 20, 2020 10:43 pm

Re: Reducing the current consumption of STM32L412KB

Post by MoDu »

600 uA in deep sleep
I'm more concerned with this, isn't it still a bit high?
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Reducing the current consumption of STM32L412KB

Post 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,...
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: Reducing the current consumption of STM32L412KB

Post 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
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Reducing the current consumption of STM32L412KB

Post 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.
JimEli
Posts: 20
Joined: Sat Apr 17, 2021 11:33 pm

Re: Reducing the current consumption of STM32L412KB

Post by JimEli »

not trying to steal the thread, but what is a good method to measure power consumption?
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Reducing the current consumption of STM32L412KB

Post by fpiSTM »

On Nucleo board you have an jumper for IDD measurement. It allows to have only MCU consumption.
niagFT
Posts: 7
Joined: Wed Sep 29, 2021 8:18 pm

Re: Reducing the current consumption of STM32L412KB

Post 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...
Post Reply

Return to “General discussion”