cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 hardware connection problem

arilink
Associate III

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?

5 REPLIES 5
TDK
Guru

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
Associate III

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.

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".
arilink
Associate III

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.

Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen