I'm working on a low power project that my micro-controller can only have 1 mA in 2.7 V. 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 ?

  • \$\begingroup\$ Either you're doing something that causes higher power consumption, or you're actually browning out from the meter burden voltage and getting an artificially low number because the MCU is not running. Your goals should be achievable when running off the MSO without PLL multiplication and care not to drive signals against pulling resistors, etc, but no one is going to be able to tell you exactly what is wrong until you make more investigation of the system. \$\endgroup\$ Nov 13 '20 at 19:02
  • \$\begingroup\$ Get a serial port going to give commentary on what your program is doing and insert human scale time delays so that you have time to look at the current as it passes through various operational phases. Disable functionality you think might be causing high current and see what sort of change results. Consider other things on the board beyond the MCU, bus contentions, etc... \$\endgroup\$ Nov 13 '20 at 19:04
  • \$\begingroup\$ Thank you Chris for your tips. But when current consumption is about 0.65 mA the micro controller is connected to the debugger and I can see the ADC working well and either with oscilloscope I can see the PWM signal, so it think that time it works well. \$\endgroup\$ Nov 13 '20 at 19:06
  • 3
    \$\begingroup\$ I have often found when aiming for low current that floating digital inputs can cause a problem. They float around and behave for a while but when near the transition point they are prone to oscillate and can cause current draw. Try attaching pull-up or pull-down resistors to unused inputs and see if that helps. \$\endgroup\$ Nov 13 '20 at 21:39
  • 1
    \$\begingroup\$ @JohnBirckhead the actual issue with what you reference is not oscillation but rather shoot-through from having both input FET's partially on. \$\endgroup\$ Nov 14 '20 at 3:30

Based on John's answer to my question, 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.

  • \$\begingroup\$ You can do that with the internal pulling resistors, or simply by setting unused pins to analog mode \$\endgroup\$ Nov 14 '20 at 3:28
  • \$\begingroup\$ First I check the internal pull-down or analog mode but after afew minutes I see the jump in current consumption. But when I connect them with resistor to GND it works with out problem. you think what is the reason? \$\endgroup\$ Nov 14 '20 at 19:09
  • \$\begingroup\$ It would appear your program is allowing the chip configuration to change, perhaps by misoperating due to a programming error. But as before, without details this is really unanswerable. All you have are guesses. \$\endgroup\$ Nov 14 '20 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.