Skip to main content
arilink
Associate III
August 24, 2021
Question

STM32 hardware connection problem

  • August 24, 2021
  • 2 replies
  • 1166 views

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?

This topic has been closed for replies.

2 replies

TDK
Super User
August 24, 2021

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?

0693W00000DqAYJQA3.png 

The 22ohm inline resistors are for impedance matching. The only place I can see them mentioned is here, which says they are not needed:

0693W00000DqAYxQAN.png

"If you feel a post has answered your question, please click ""Accept as Solution""."
arilink
arilinkAuthor
Associate III
August 24, 2021

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.

TDK
Super User
August 24, 2021

Yep, that's inconsistent.

0693W00000DqAb3QAF.png 

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.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Technical Moderator
August 24, 2021

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks