4 years, 11 months ago.

STM32 USB Connection

Hi, I have a Nucleo f303re development board with support of ST's own USB Device library. Onboard usb port is for ST-LINK so i dont want to unplug its connections. So i tried to implement another usb port as a little breakout board. I connected DA+ to PA_12 and DA- to PA_11 and GRND to GRND and power to the E5V pin on the board. And there is a 1.5kohm resistor on DA+. My problem is im getting power from the USB but ST's own f303re examples for USB Device doesnt work. My windows 10 is not seeing the board in HID example and also not seeing it as VCP when i try to configure the board as USB CDC VCP. How can i solve this problem. Thanks.

1 Answer

4 years, 11 months ago.

From your USB break out, USB Pin 1 (5v) should go to pin 8 connector CN6 and header pins 2-3 linked on JP5 to select E5V if you want to power up from your USB break out.

Otherwise JP5 link pins 1-2 to power from ST-Link USB.

D- (pin2) and D+ (pin3) go to the MCU as you indicate, D+ (pin2) must be lifted to 3v3 via a 1k5 resistor which triggers the PC to communicate. Make sure that voltage is there otherwise the PC will ignore your connection.

USB pin 4 should be grounded via 100k resistor, pin 5 and 6 go to ground.

If the USB pins are powered as above and no program running 'normally' the PC will indicate unrecognized device, at least that's what I have experienced.

I have always found the USBDevice function to be a bit flaky, sometimes I connect the USB then power the MCU other times I power up the MCU then connect the PC.