Skip to main content
Associate II
Feb 20, 2025 3:43 PM UTC
Solved

STM32 H5 Nucleo USB Custom HID

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.
FBLBest answer
ST Technical Moderator
Feb 20, 2025 7:34 PM UTC

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

6 replies

BenGAuthor
Associate II
Feb 20, 2025 3:53 PM UTC

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
Feb 20, 2025 3:53 PM UTC

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
Feb 20, 2025 3:57 PM UTC

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
Feb 20, 2025 4:06 PM UTC
BenGAuthor
Associate II
Feb 20, 2025 4:50 PM UTC

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

FBLBest answer
ST Technical Moderator
Feb 20, 2025 7:34 PM UTC

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