Skip to main content
Associate II
February 20, 2025
Solved

STM32 H5 Nucleo USB Custom HID

  • February 20, 2025
  • 6 replies
  • 2781 views

I'm trying to experiment with a Custom HID USB demo.

I'm following the instructions at:
How to implement a USB device custom HID class on ... - STMicroelectronics Community

Part way down it suggests:

BenG_0-1740066113310.png
However when I got to Middleware I don't have USB_DEVICE (I just have USBX)

BenG_1-1740066156951.png
I can't see a way to add the USB_DEVICE Package to to the middleware list.

Help (please)?

 

 

This topic has been closed for replies.
Best answer by FBL

Hi @BenG 

 

I'm not too bothered (at this stage) whether I use the classic library or USBX (as frankly, I don't yet have enough knowledge to have a preference).

Both stacks are supported on this product, if you would like to use CubeMX, you need to use USBX stack. 

I'd rather suggest this article How to implement USBX in standalone mode - STMicroelectronics Community

I hope this helps!

6 replies

BenGAuthor
Associate II
February 20, 2025

Ok,

I've come across the post:
USB_DEVICE missing from CubeMX - STMicroelectronics Community

This suggests the instructions linked in the top post are out of date. Is there an up to date guide/tutorial for implementing a custom USB HID device on a Dev Kit/Demo Board?

ST Technical Moderator
February 20, 2025

Hi @BenG 

STM32H5 natively supports USBX not legacy library. So CubeMX doesn't support ST classic library. Check this repository for ready to use examples based on classic middleware over H5.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
BenGAuthor
Associate II
February 20, 2025

Thanks @FBL 

I'm not too bothered (at this stage) whether I use the classic library or USBX (as frankly, I don't yet have enough knowledge to have a preference).

Are there any guides/tutorials/demos on using USBX ?

BenGAuthor
Associate II
February 20, 2025
BenGAuthor
Associate II
February 20, 2025

That's regrading on OTG Host, I'm after something much more simpler to demo/experiment with.

FBLBest answer
ST Technical Moderator
February 20, 2025

Hi @BenG 

 

I'm not too bothered (at this stage) whether I use the classic library or USBX (as frankly, I don't yet have enough knowledge to have a preference).

Both stacks are supported on this product, if you would like to use CubeMX, you need to use USBX stack. 

I'd rather suggest this article How to implement USBX in standalone mode - STMicroelectronics Community

I hope this helps!

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL