Skip to main content
sshaf.1
Associate
Nov 13, 2020 6:56 PM UTC
Solved

STM32L0 current consumption jumps from 650uA to 2-8mA

Hi,

I'm working on a low power project that my micro-controller can only have 1mA in 2.7V.

My micro-controller is stm32l051c8 and its works nice with its peripherals (ADC and Timer) and its current consumption is about 0.65 mA.

 

But After working for A few minutes the current consumption Suddenly jumps to higher numbers(about 2 to 8 mA !!) and coming back to 0.65 mA after seconds and again it works nice for A few minutes and this chain continues irregularly .

I'm working with stm32l031 before and have the same problem. you guys think what is the reason ?

This topic has been closed for replies.
sshaf.1
sshaf.1Best answer
Associate
Nov 14, 2020 2:24 AM UTC

Based on John's answer to my question in electronics.stackexchange forum , the answer is to add a Pull-Down resistor to all micro-controller floating pins. In this case, current consumption jumping is no longer observed in micro-controller.

Thank you John Birckhead.

4 replies

gregstm
Senior II
Nov 13, 2020 10:17 PM UTC

Maybe a pin that should be set to Output(Low or High) is set to floating/analog. What clock hertz are you running your micro? That is, if your micro was running an infinite loop could it drain 8mA? If so, then it could be a software problem (but hopefully for a low power project you would be running your micro at the lowest clock frequency possible). I assume the Boot0 pin is tied low, reset pin is wired correctly etc.

The art of debugging is spending less time on wondering what the problem is, but spending more time on devising little tests and strategies to rule out possible causes (and hopefully advance steadily to a resolution). Eg. enable and monitor the MCO while current changes, probe pins with an oscilloscope while current is high/low, try test versions of software that are permanently in a loop/sleep etc. toggle leds/pins so you can monitor activity while current changes

sshaf.1
sshaf.1AuthorBest answer
Associate
Nov 14, 2020 2:24 AM UTC

Based on John's answer to my question in electronics.stackexchange forum , the answer is to add a Pull-Down resistor to all micro-controller floating pins. In this case, current consumption jumping is no longer observed in micro-controller.

Thank you John Birckhead.

gregstm
Senior II
Nov 14, 2020 3:03 AM UTC

... you know you could save board space, soldering time and component cost by configuring the pins as output-low, or perhaps even using the internal pulldown...

Piranha
Principal III
Nov 15, 2020 11:00 AM UTC

There is a whole application note dedicated to this: AN4899.