2025-09-24 4:25 PM - last edited on 2025-09-24 5:03 PM by Andrew Neil
Hi,
I would greatly appreciate it if someone could share their thoughts here and let me know if my understanding is correct.
Question 1. The STM32H573 supports both USB Host and Device, but why are “USB_OTG_FS” or “USB_DRD_FS” not visible in CubeMX?
It appears to be due to the USB IP architecture. The STM32H573 integrates a dedicated USB 2.0 Full-Speed Host & Device block, but unlike some other STM32 series, it does not provide an OTG/DRD block with ID-pin based automatic role switching.
As a result, CubeMX only exposes it as “USB (FS)”, and the user has to manually select either Host or Device mode.
Question 2. Is the current CubeMX GUI template for the STM32H5 series limited to Device-only USB configuration?
Both Host and Device functionality are supported by the hardware, but in CubeMX the GUI is still modeled primarily for Device-only use.
This means that CubeMX does not automatically generate the corresponding code for Host operation, and the developer must manually initialize the HAL PCD/HCD layer and integrate the USB class stack.
Question 3. Is this a limitation of the HAL / CubeMX software support?
It looks like. The STM32H5 HAL and CubeMX templates do not yet fully reflect OTG/DRD operation.
Therefore, in CubeMX the USB_Device middleware menu may not appear, and class code such as HID is not automatically generated.
In this case, HID, and other USB class drivers need to be added manually to the project, which can lead to issues such as class registration function call errors such as like attachments:
Thank you!
2025-09-24 5:40 PM - edited 2025-09-24 5:41 PM
This chip does not support OTG because there is no ID pin (nor does it have the underlying hardware support). Because of that, you won't find any OTG options in CubeMX for it.
To enable it as a USB host, select host in the USB tab and then configure it in the USBX tab. Seems to be working okay in CubeMX. USBX is the supported USB framework for this chip.