2022-06-13 05:43 AM
I have a USB HID product based on the STM32F205. We've built thousands of them. However, recent builds have shown about a 5% failure rate where the device fails to enumerate (some of this 5% might fail 50% of the time when power cycling, some 90%+). I have a suspicion that the dropout voltage regulator we are using may have too slow of a rise time and it is occasionally triggering the brownout detection. The clues are both that the device fails to enumerate, but also that a switched GPIO used to control an additional LDO for other components never goes high (it should be high permanently from power-up).
But I can't figure out how to test for this. If I connect an ST-Link, the issue goes away: the device enumerates 100% of the time. I can't trigger an LED or something, as the device state can't be trusted in brownout reset. I can't disable brownout, only vary the level. Is there another way I'm missing of verifying the device is in brownout reset?
2022-06-13 05:50 AM
https://community.st.com/s/question/0D50X0000BL6KktSQF/brown-out-detection
2022-06-13 05:51 AM
what about toggling a GPIO when the micrcontroller resets and use that as a trigger for an oscilloscope probing VCC 3v3?
2022-06-13 07:54 AM
Looking through the datasheet, it's not 100% clear to me: is the Hard-Fault Handler called whern a BOR reset occurs?
2022-06-13 08:03 AM
i meant toggle a GPIO when the microcontroller starts , not when it shutsdown.
2022-06-13 08:30 AM
At startup you can see in the reset register if a brownout happened. Light up the LED in thhat case.
Consider also oscillator startup issues.