Skip to main content
Graduate
May 7, 2024
Question

how to reduce inrush current when stm32 powering up?

  • May 7, 2024
  • 5 replies
  • 5756 views

Hi,

As the title described, how to mitigate the current behavior when stm32 is applied power? My commercial power system are quite sensitive when MCU is power on.

For example, let stm32 enters into low power mode once power is on and then control the chip enter into fromal user mode. Would that help?

thanks.

 

    This topic has been closed for replies.

    5 replies

    Super User
    May 7, 2024

    The datasheet will tell you what the default clock configuration is at startup; eg,

    AndrewNeil_0-1715097043887.png

     

    See also the Reference Manual:

    AndrewNeil_0-1715098822372.png

     

    So, of course, you can work it from there.

    Graduate II
    May 7, 2024

    Recent families often have inrush current/charge specification in that situation. But you do not tell us, what current changes distrube your "commercial power system" Are you sure your problems are caused by this problem?

    JKWAuthor
    Graduate
    May 16, 2024

    Hi Uwe,

    The commercial power system(to be specifically, it is a power supply made according to uTCA system and spec)has very limited 3.3V power supply.  And it has over current protection ~180mA. And when my board(3.3V powered MCU assembled on it) powered up, it easily triggered the over protection behavior. So I suspect the inrush current of 3.3V(mostly consumed by MCU) may cause this problem, that's why I post it here to find a way to reduce inrush current.

    Super User
    May 16, 2024

    @JKW wrote:

    I suspect the inrush current of 3.3V(mostly consumed by MCU) may cause this problem, 


    So you really need to confirm that suspicion - otherwise you might be on a wild-goose chase ...

    As @Danish1 said, you need to take some measurements - whether monitoring the current using a simple shunt (as he described), or something more sophisticated like an STLINK-V3PWR:

    https://www.st.com/en/development-tools/stlink-v3pwr.html 

    Graduate
    May 16, 2024

    When you first apply power - before your microcontroller can do anything - the power you apply charges up all the power-supply-decoupling capacitors in your system.

    The handful of 0.1uF high-frequency decoupling capacitors are probably not the issue here.

    More likely if you have 10uF to 100uF of electrolytic (or more) before or after the 3.3V regulator, they will contribute a huge amount to the inrush current, possibly enough to trip your overcurrent detector.

    What stm32 microcontroller are you using? Many would not burn as much as 100 mA when running flat-out, so there's little you can do to fix things there.

    It would be handy to measure the current - put a small (say 1 Ohm) resistor in series with the power line to your mcu board and measure both before and after the resistor with an oscilloscope. Is the highest current in the first millisecond or two of applying power, or does it happen (say) 10 - 100 ms later? If the latter, it could indicate that it is the mcu software startup, but do show us the results.

    Another issue - does your mcu switch / drive high currents? Until it has started running your code, the GPIO outputs will be high-impedance. Do you have resistors to ensure any driver switches are turned off during the time the processor is in reset?

    Finally I will add that until you have first programmed the stm32, it will start up in ST's bootloader. This drives certain pins as e.g. UART, I2C; see AN2606 STM32 microcontroller system memory boot mode  for which pins are driven and how. This may also cause high currents depending how you use those pins.

    Super User
    May 16, 2024

    @Danish1 wrote:

    What stm32 microcontroller are you using? Many would not burn as much as 100 mA when running flat-out


    Indeed - and they (mostly?) don't start up running flat-out.

     

    Graduate
    May 17, 2024

    I'm somewhat frustrated by what you tell us (or don't tell us). It's as if you've been given a theoretical* problem to sort out without the tools or knowledge rather than someone who was intimately involved with the design and engineering.

    Has the power-supply tripped? Does it consistently trip, so that if you make a change and it doesn't trip after the change, you can be reasonably confident that the change you made genuinely helped?

    My suspicion is tripping is associated with the inrush when charging up the power lines.

    Have you had a look at the schematic? I can well understand commercial sensitivity so it wouldn't be right for you to share significant amounts of actual circuit details. I explicitly mentioned the capacitance of power-supply-decoupling capacitors you have on your +3.3V power-supply. What total do you have there in microfarads? Does the 3.3V regulator have soft-start? Is there explicit circuitry to hold the stm32 microcontroller in reset until the power-supply is up and stable?

    Are there any other capacitors that need charging, that might also contribute to the inrush current?

    But I could be wrong about this.

    It could be something the microcontroller is doing. A way to test this could be to keep the microcontroller in reset (tie the RESET line low) then applying power.

    Or it could be the time-window before the microcontroller starts doing what it should be doing. If the microcontroller drives some power-switches (e.g. transistors) but your design doesn't include resistors to pull the control lines into a "safe" state before the microcontroller starts up. In which case keeping the stm32 reset could make things worse.

    *Maybe someone, perhaps in management rather than engineering, has asked "what if the power supply trips?"

    JKWAuthor
    Graduate
    May 17, 2024

    Hi Danish1,

    I have to say I'm testing the hardware system but without enough hardware detail design information of the power system and power module(no schematic, only user manual). I tried to contact the technical support from manufacturer but failed.

    I could provide some answer your questions:

        decoupling cap for 3.3V about ~2uF

        No 3.3V soft-start designed

        No circuit to hold STM32 in reset until power supply is stable.

     

    You mentioned to keep MCU in reset then applying power, it's good idea to give us right direction.

    the last question you asked, I also want to know, but now only the original equipment manufacturer could answer this. I used some commercial system chassis and system as shown below:

    JKW_1-1715946339043.png

     

     

    Thanks.

    Graduate II
    May 17, 2024

    "No circuit to hold STM32 in reset until power supply is stable."

    I hope you have at least the recommended 100nF on RST to ground  w/o any additional pullup. Otherwise I assume hickup is easy possible, especially with some "controlled" supply.

    Graduate
    May 18, 2024

    We do want to help. Having re-read this thread, I still don't know how often the trip happens - if at all. At some stage you'll have to do something that can't be undone.

    • It could be speaking to some of those who were involved in the design of the microcontroller board. I was never brave enough to do that kind of thing when I worked in a large company. But those who were ended up extremely successful and useful employees.
    • Or it could be cutting the wire that runs from the power-supply to the microcontroller board, inserting a 1 Ohm resistor and using an oscilloscope to track the voltage on either side of the resistor. This could sort-of be undone by replacing the wire once you've gathered all the useful information. People will see your soldered joints.
    • You could temporarily tack a wire from the reset pin on the microcontroller to Vss, assuming that's not directly tied to a different power-rail. If that's brought out anywhere convenient. If in doubt use a (say) 100 ohm resistor. Even after you remove the wire it won't look pristine. And then the microcontroller will permanently be held in reset, so all you see is what happens before the microcontroller comes up. And it's up to you to determine if that's any better or worse as regards the power-supply tripping. Once you remove this wire there will be some evidence of "history" on the pcb. Take photos with your phone and make notes of what you're trying and what effect it has. The designer of the pcb should be helpful as to a good place to attack.

    I'll say I don't have a current probe. I always regarded them as too expensive given how infrequently I would use them, and the different insight from the voltages either side of a series-resistor can sometimes be helpful.