You are here

USB Design and connection issues

3 posts / 0 new
Last post
brieru
Offline
Last seen: 5 days 19 hours ago
VESC Bronze
Joined: 2021-10-19 09:24
Posts: 2
USB Design and connection issues

I had problems with the USB connector, it got disconnected every time i was giving power to the motor, until a discussion on the Discord chat opened my eye.

ST doesn't say anything in the STM32F405RG datasheet about the USB pull-up or termination resistor, but in their discovery board they use just two termination resistor of 22ohm.
That said you can find those two resistor in many many design, even in the VESC 6 designs, welll ... replace them with 0 ohm resistor or don't use them at all.
Immaginethis is wrong.

 

As noted by mckenzie on this ST application note https://www.st.com/resource/en/application_note/an4879-usb-hardware-and-pcb-guidelines-using-stm32-mcus-stmicroelectronics.pdf they are in facvt stating that there is no need to provide and external termination resistor

On the internal USB PHYs, the matching output impedance is already embedded in the pad transceiver and is in line with the USB specification. No external resistors are needed.

In fact if you use those 22R you will probably get too much reflections and ringing and this will cause in USB instability.
Also it's suggested to wire the usb shield to the PCB ground, and not to use a ferrite bead as i got better result with a 0R resistor than a bead between board GND and USB gnd.
 

Hope this will help someone in the future

skyline1970
Offline
Last seen: 4 weeks 1 day ago
VESC Free
Joined: 2017-09-07 22:28
Posts: 204

So, just special USB protection diodes should be used.

brieru
Offline
Last seen: 5 days 19 hours ago
VESC Bronze
Joined: 2021-10-19 09:24
Posts: 2

yes, just protection diodes