2020-11-13 10:56 AM
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 ?
Solved! Go to Solution.
2020-11-13 06:24 PM
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.
2020-11-13 02:17 PM
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
2020-11-13 06:24 PM
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.
2020-11-13 07:03 PM
... 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...
2020-11-15 03:00 AM
There is a whole application note dedicated to this: AN4899.