cancel
Showing results for 
Search instead for 
Did you mean: 

usb enumeration errors, new project from cubemx

netanelu
Associate III
Posted on July 22, 2015 at 19:03

Hi, i have an discovery STM32F407 board,

using cubemx (4.9.0), opened new project for the STM32F407 discovery board.

enabled USB_OTG_FS ''Device Only'' mode without SOF and without VBUS.

Selected the CDC class, the clock and every thing is ok, the code generator for IAR.

Compiled and run.

On windows device manager i have new device:

STMicroelectronics Virtual COM Port (COM5)

But i get this error:

This device cannot start. (Code 10)

{Operation Failed}

The requested operation was unsuccessful.

configured USB class as custom HID:

This device cannot start. (Code 10)

Extra end collection found or end collection not found.

on another laptop i get ''the i\o request was cancelled''

the mouse example works well.

using windows 8.1.

I worked with another manufacture HID example and it works well, so i don't believe it's a driver issue.

Will be thankful for any help, thanks.

#cdc #cube #usb #stm32f407
5 REPLIES 5
kingtama
Associate II
Posted on February 01, 2016 at 19:58

I can't believe nobody replied to this. I'm having the exact same problem. I'm using an STM32F205RFx chip however.

The HID Code generated from the CubeMX using 4.12.0 works correctly. Although it was very tricky figuring out all the clock configurations. My board has a 25Mhz oscillator. I can get the CDC example to work or the Custom HID since there is something wrong (or possibly not configured) on CubeMX or the Generated code.

I'm using the Keil Compiler MDK-5

Did you ever figure it out?

mark239955_stm1
Associate II
Posted on February 02, 2016 at 07:08

Try again, but with Vbus turned on.

Also, you should update your CubeMX platform and library/s.

kingtama
Associate II
Posted on February 08, 2016 at 18:23

Just updated to 4.13 of the CubeMX and tried again. Same result. Also I always enabled VBus. I will try it again without VBus and maybe try a few other configurations. Going through the Analyzer everything appears to be working something fails.

spflanze
Associate II
Posted on March 07, 2016 at 22:18

I too had exactly this problem. I increased the defaultTask stack size from 128 to 256. Then after I start it up with the emulator probe I have to unplug and then plug back in the USB cable, after which I got ''STMicroelectronics Virtual COM Port (COM9)'' showing without error in Windows 7's Device Manager under ''Ports (COM & LPT)''

connectjagadeep
Associate II
Posted on March 08, 2016 at 18:35

Hi All,

          I too had same problem and it got fixed now. Make sure that you set USB CLK to 48 MHz in Clock Configuration tab in the Cube. Not all SYS CLK will generate it, but try with different values. It got it to set for 60MHz of HCLK. Also make sure that you select BYPASS Clock source under RCC in pin configuration. 

Regards,

Jagadeep.