0
\$\begingroup\$

I'm using STM32L0. My firmware operates at 2V. These are stepped down from 24V. If I have a short of the 24V for a short period of time this causes a brown out on my 2V the voltage begins to oscillate from my step down.

I want to solve this with software.

If seen that I don't get this problem without a load ( while(1), all peripherals turned off. )

I added a for-loop at the start of the program, that held for a few seconds, that didn't help. To me this means the program does not actually reset. Its somehow latches up unless the voltage drops bellow a threshold.

Can I use under voltage detection or brown out detection of STM to prevent this?

I need to force a reset as soon as the voltage drops bellow around 1.8V. I need to react, if I don't want an oscillation, within around 3ms.

brown out no brown out

\$\endgroup\$
7
  • \$\begingroup\$ Try to set a higher brownout level. Is brownout reset enabled? \$\endgroup\$
    – Turbo J
    Commented Aug 5, 2016 at 15:42
  • 1
    \$\begingroup\$ The older I get the more I worry about brown-outs \$\endgroup\$
    – Andy aka
    Commented Aug 5, 2016 at 16:11
  • 1
    \$\begingroup\$ Some ICs under some conditions enter a mode where they will not reset properly until Vdd is pulled below a very low level and held there for a minimum period. eg under 0.1V for 1 second or whatever. This can be due to charge injection into nodes in the IC during illegal powerdown modes where current flows back via a load pin with a capacitance on it that keeps the pin high when Vdd falls. IF you can identify such a pin you may be able to add a clamp that clamps it low ehen reset occurs. I've seen this happen with processors and other ICs. \$\endgroup\$
    – Russell McMahon
    Commented Aug 5, 2016 at 16:23
  • 1
    \$\begingroup\$ A short and a brownout are two very different things. Getting the MCU to make the best of the situation is worthwhile, but you should also be clarifying and fixing the power issue itself. \$\endgroup\$ Commented Aug 5, 2016 at 16:37
  • 2
    \$\begingroup\$ I want to solve this with software. Ah... I like it. Solving hardware problems in software is my favorite. Especially if that's not me do it.. \$\endgroup\$
    – Eugene Sh.
    Commented Aug 5, 2016 at 16:38

1 Answer 1

1
\$\begingroup\$

The micro core will work at 1.65 but the peripherals will not all work below 1.8V. With 1.8V supply there is no headroom between when the BOR trips and where the micro misbehaves. Setting the supply to 2.5V and the BOR to 2.2V gives some time to react before the supply reaches 1.8V and will have better noise immunity. 1.8V regulators have a tolerance. some will give slightly less than 1.8V and so some boards will misbehave if you build enough. Choose a regulator from 24V with a defined enable voltage and set the regulator to switch off at a much higher Voltage using a potential divider on the enable input. The supply will only be there when it is stable.

\$\endgroup\$
1
  • \$\begingroup\$ Useful answer 4 + years on :-) \$\endgroup\$
    – Russell McMahon
    Commented Apr 13, 2021 at 1:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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