cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F401 on custom board. USB doesn't work

Gabriele Adamo
Associate II
Posted on March 24, 2017 at 19:16

Hi everybody,

This is my first question, I really hope you can help.

I soldered a STM32F401RC on my custom board and I connected it to a mini-usb plug. In particular, I connected PA9 to Vbus, PA11 (configured as USB_OTG_FS_DM) to D- , PA12 (configured as USB_OTG_FS_DP) to D+, VSS to GND.

The USB doesn't work. Windows says 'Unrecognized device' and the Vbus voltage is 1V instead of 5V.

What is wrong?

Thank you in advance.

3 REPLIES 3
S.Ma
Principal
Posted on March 25, 2017 at 14:41

Check the discovery board schematics around USB. Some USB IP versions need external pull-up resistors while others have it programmable internally. Check also if this device requires a precise external clock to operate as device. Internally the macrocell needs to generate 48MHz for the USB cell.

Posted on March 28, 2017 at 11:12

Hi, I'm very sorry for my delay and thank you for your interest.

I carefully considered the USB schematic of the STMF401 discovery board. On page 35 I see the USB_OTG_FS section0690X00000603geQAA.jpg

The difference in my implementation is that I have no 22ohm series resistors on the lines PA11 and PA12, I have no EMIF02-USB03F2 for the ESD protection and I have no STMPS2141STR circuitry on VBUS (the latter because my board has to work only as device and not as host). In other words, in my implementation, the pins of the STM32 are directly connected to the USB plug.

PA9  (

configured as

USB_OTG_FS_VBUS

) -> Vbus

PA11 (configured as USB_OTG_FS_DM) -> D-

PA12 (configured as USB_OTG_FS_DP) -> D+

SENSE and GND of the USB plug are both connected to GND.

I obtain a voltage of 1V on the VBUS line, that is absolutely wrong and I don't understand why. Of course the USB interface doesn't work. The whole board works correctly via the USART interface connected to a ST-linkV2-1.

Thank you again.

Gabriele Adamo
Associate II
Posted on March 29, 2017 at 13:21

I solved!!!!!

The problem was I didn't connect the shield of the USB plug to GND.