2019-08-29 05:48 AM
I'm working on a device with USB connectivity (based on the STM32F401, but I think the question is generic to all STM32). In AN4879 about USB hardware design, section 2.6 I read:
Pin PA9, a 5 V-tolerant pin, is natively dedicated to VBUS sensing. The absolute maximum ratings table of the datasheet indicates that the 5 V-tolerant pin voltage cannot exceed VDD + 4 V. User needs to avoid the situation when the MCU is not powered and 5 V VBUS is connected to PA9, because it violates the condition on absolute maximum ratings and can result in permanent damages to the device.
(...)
For reliable and safe connection, use a voltage divider with a configuration limiting the voltage below 4 V. Additionally, to be detected, voltage needs to be higher than 0.7 × V DD .
In other words: in self-powered designs, the MCU can be unpowered (VDD=0), so VBUS (5V) exceeds the maximum voltage on PA9 (VDD+4V).
However, I'm working on a design that can be both self-powered and bus-powered. Specifically, when external power is applied, that is used, otherwise USB power is used. This means that the device is always powered when VBUS is present, so there can be no steady condition where the MCU is powered down, but VBUS is present.
However, when no external power is present and an USB cable is attached, there could be a transient state where VBUS (which would be directly connected to PA9) is already present/rising, while VDD is still switched off (there is a TPS2111 power switch and a regulator in between, which (in theory, not measured yet) need a couple of ms to provide VDD to the STM32.
Anyone know if such a transient overvoltage is also problematic? In the DS10086 I can't find anything other than "Input voltage on FT pins: Max VDD+4V" (section 6.2).
2019-08-30 12:35 AM
You've named it, 5V > 0+4V.
JW