2021-08-23 08:16 PM
MCU: STM32 F105RBT6
I have encountered some problems when making hardware with USB. I see some information is that a 22Ω resistor is connected in series between the D+ D- of the USB socket and the MCU, and some are connected with a 1.5K pull-up on D+. Resistance and the description of the resistance in the USB manual AN4879 is also inconsistent. The first said that there is an internal 1.5K pull-up resistor, and the second said that a 1.5K pull-up resistor is needed. How should USB be wired?
2021-08-23 08:40 PM
What's inconsistent? AN4879 says there's an internal pullup, so you do not need to add an external one. Where does it say an external one is needed?
The 22ohm inline resistors are for impedance matching. The only place I can see them mentioned is here, which says they are not needed:
2021-08-23 08:50 PM
in the page 4 it says 1.5k resistor should be added
Another problem. According to the description of the manual, VBUS can not be used when using bus power supply, but the actual situation is that if you don’t give VBUS a high level, USB will have no response.
2021-08-23 09:07 PM
Yep, that's inconsistent.
VBUS detection is not mandatory if your device is bus-powered, since VBUS will always be high. That is true on the STM32F4. I haven't used it on the STM32F1 but can't see why it would be different. The RM certainly supports this.
2021-08-23 10:48 PM
So this confuses me. The only possible explanation is that STM32F105 has an internal 1.5kΩ resistor, but it only triggers when VBUS is high. This may also be the reason why USB only works when VBUS is high.
2021-08-24 12:44 AM
Hi,
USB device shall use VBUS sensing detection, when host connection is detected by the device, device connects pull-up resistor either to D+ or to D-.
As mentionned by TDK, If USB device is bus-powered, VBUS sensing is NOT mandatory.
For more details, please have a look at this article: Management of VBUS sensing for USB device design
Imen