Skip to main content
User16782158065171037550
Associate II
August 25, 2021
Question

STm32 USB HID not working

  • August 25, 2021
  • 7 replies
  • 2663 views

HI,

STM32 USB HID mouse generated with CubeMX not working. Tried with all Discovery board also.

Help needed. Tried on STM32F103RB, STM32F429, STM32F746, none working.

Thanks,

This topic has been closed for replies.

7 replies

Mike_ST
Technical Moderator
August 25, 2021

Hello,

Please, check that interrupt for USB IP is activated.

I think this was an issue before.

Otherwise, have you tried the examples that are included in the STM32 firmware packages ?

User16782158065171037550
Associate II
August 26, 2021

I have tried the examples in the packages. Which interrupts do you mean by interrupt for USB IP?

Thanks

Mike_ST
Technical Moderator
August 26, 2021

>> I have tried the examples in the packages.

Do they work ?

Talking about the following interrupt "USB On The GO HS" here:

0693W00000DqRFsQAN.png

User16782158065171037550
Associate II
August 29, 2021

The examples do not work. I am using FS. Thanks for the reply.

User16782158065171037550
Associate II
August 29, 2021

I am posting here in detail.

STM32CubeIDE v1.6.1

Firmware Package Name and Version: STM32Cube FW_F1 v1.8.4

OS: Ubuntu 18.04.5 LTS \n \l

HW: STM32F103RBT6

It is not even enumerating. The .hex file provided by the board manufacturer enumerates as USB HID, but when I create a project in STM32CubeIDE / STm32CubeMX, it does not even enumerate.

Also tired on STM32F429ZI Discovery board, STM32F746 Discovery board, none working.

Attached STM32CubeIDE project.

0693W00000DlWmrQAF.png

Mike_ST
Technical Moderator
August 30, 2021

Do you manage PD2 in your software?

Where do you initialize PA11 and PA12 ?

Please look at usbd_conf.c from the STM32F103RB-Nucleo example

User16782158065171037550
Associate II
September 4, 2021

Hi Mike_ST,

I got it working on STM32F103RB, the PD2 was not set correctly. I am not able to get it working on STM32F429 and STM32F746 discovery board, WIP.

Thanks all for your help and suggestions.

Regards,

Milind

kaamil1984
Associate II
November 13, 2023

Hi, did you managed to make it work on STM32F746?