2014-08-01 06:14 AM
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)?2014-08-05 10:38 AM
Anybody? I can elaborate if you ask.
And what voltage should I measure on DP and DM lines when the usb cable is connected?2014-08-05 12:20 PM
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.2014-08-06 01:34 AM
Vaclav,
are you absolutely sure, that the D+ and D- lanes are connected correctly (1:1)?2014-08-06 07:56 AM
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.