cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] USB device not enumerated

tpphysik
Associate II
Posted on August 01, 2014 at 15:14

Hello,

I'm trying to get the USB Virtual COM port loopback example project work on STM32F102.

When the USB is connected, the PC says ''Unkown device connected'' with VID 0 PID 0 so obviously it's not enumerated.

On the MCU side, it detects that the USB was attached, but goes to suspend state after 2 seconds or so. The device state is ''ATTACHED'', doesn't ever get to CONFIGURED.

It should be software problem because the hardware looks ok. I have 33 ohm series resistors on DP and DM lines, 1,5k pullup on DP, and VBUS wired to PortA 9 through a 10k resistor.

The system and usb clock setup also look good.

What could cause the device not enumerate and the device entering suspend mode when connected (no communication)?

This discussion is locked. Please start a new topic to ask your question.
4 REPLIES 4
tpphysik
Associate II
Posted on August 05, 2014 at 19:38

Anybody? I can elaborate if you ask.

And what voltage should I measure on DP and DM lines when the usb cable is connected?

Posted on August 05, 2014 at 21:20

Hard to say, what compiler/tool-chain are you using? GNU-GCC?

Are you absolutely sure the clocks and PLLs are set up correctly, and you have a 48 MHz clock internally. Check internal clocks with MCO pin (PA8)

Review schematic/electrical levels for assorted STM32-DISCO boards using an F103 part.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
schauer
Associate II
Posted on August 06, 2014 at 10:34

Vaclav,

are you absolutely sure, that the D+ and D- lanes are connected correctly (1:1)?

tpphysik
Associate II
Posted on August 06, 2014 at 16:56

Thank you, the problem was really with the clock setup. The example codes and the SetSysClock functions expect an 8 MHz crystal but on my board it's 4 MHz.

Now it's working.