cancel
Showing results for 
Search instead for 
Did you mean: 

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.

sshaf.1
Associate

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 .

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

1 ACCEPTED SOLUTION

Accepted Solutions
sshaf.1
Associate

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.

View solution in original post

4 REPLIES 4
gregstm
Senior III

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
Associate

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 III

... 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
Chief II

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