Skip to main content
Graduate
January 23, 2024
Solved

USB HID mouse does not work on STM32F411

  • January 23, 2024
  • 2 replies
  • 2098 views

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?

    This topic has been closed for replies.
    Best answer by JBond.1

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

    2 replies

    Super User
    January 23, 2024

    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 ) .

    JBond.1Author
    Graduate
    January 23, 2024

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

    Super User
    January 23, 2024

    @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 ... ?

    JBond.1AuthorAnswer
    Graduate
    January 23, 2024

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