cancel
Showing results for 
Search instead for 
Did you mean: 

USB HID mouse does not work on STM32F411

JBond.1
Senior

Hi, I have STM32F103 and STM32F411. I have successfully made HID mouse on STM32F103, but when I try to make the same on STM32F411, the mouse does not work: "(Code 43) A request for the USB device descriptor failed".

What could be the problem?

The code/configuration is simple I just enable:
Connectivity -> USB_OTG_FS -> Mode: Device_Only
Middleware -> USB_DEVICE ->  Class for FS IP: Human Interface Device class (HID)
Everything else is kept default.

Is this because STM32F103 has micro USB and STM32F411 has type-c? Does type-c need additional settings which I am missing?

1 ACCEPTED SOLUTION

Accepted Solutions
JBond.1
Senior

Nevermind... It seems that I set wrong oscillator value... 16Mhz instead of 25Mhz! Now mouse example is working!

View solution in original post

5 REPLIES 5
AScha.3
Chief III

Hi,

Is this because STM32F103 has micro USB and STM32F411 has type-c?

No, the message tells you: "..USB device descriptor failed".

So look in your F103 project, what is missing in F411 project (-- device descriptor ) .

If you feel a post has answered your question, please click "Accept as Solution".

I don't think I have changed anything manually. Everything should be kept as default after generating the project with CubeMX.

JBond.1
Senior

Nevermind... It seems that I set wrong oscillator value... 16Mhz instead of 25Mhz! Now mouse example is working!


@JBond.1 wrote:

I don't think I have changed anything manually. Everything should be kept as default 


But defaults could be different between F103 and F411 ... ?

The issue was in wrong clock configuration. Oscillator value 16Mhz instead of 25Mhz.