2024-09-13 4:10 AM - last edited on 2026-02-16 2:55 AM by Andrew Neil
Hi, I tried to configure the USB Host for a project, but it’s difficult to configure, and I am not finding any online support available for the STM32H5 series controller.
My requirement: I configured PB4 as an output, which is connected to a green LED. Whenever I plug the USB into my controller, the green light turns on, and whenever I remove the USB from the controller, the green light turns off.
I’ve tried some methods, but they are not working. Can anyone please help me?
Solved! Go to Solution.
2024-09-25 7:27 AM - last edited on 2026-02-16 2:55 AM by Andrew Neil
Hello,
>> it is applicable for Customized board STM32H563ZIT6 Controller?
No.
As per STM32H563 reference manual , there is a "Universal serial bus full-speed host/device interface"
So, host mode is supported on that chip, if you've made a design of your own, it should work.
2024-09-13 4:14 AM
sorry i Mis-understandingly mention the labels as STM32G0 Series.but The original Label is STM32H5
2024-09-13 8:09 AM
Hello,
you can find an USB HOST example for STM32H5 in the Projects\STM32H573I-DK\Applications\USBX\Ux_Host_HID_CDC_ACM folder of the software package availbable here:
Your project seems to make use of an old package v1.1.1 when v1.3.0 is available.
Just in case you're using a Nucleo 144 with STM32H563ZIT6, host mode is not supported on that board.
2024-09-24 6:09 AM
>Just in case you're using a Nucleo 144 with STM32H563ZIT6, host mode is not supported on that board.
it is applicable for Customized board STM32H563ZIT6 Controller?
2024-09-25 7:27 AM - last edited on 2026-02-16 2:55 AM by Andrew Neil
Hello,
>> it is applicable for Customized board STM32H563ZIT6 Controller?
No.
As per STM32H563 reference manual , there is a "Universal serial bus full-speed host/device interface"
So, host mode is supported on that chip, if you've made a design of your own, it should work.
2025-04-07 7:04 PM
Why is host mode not supported on the STM32H563ZIT6 nucleo if it is supported by the chip?
I've been trying to implement USB Host on a custom board with the STM32H563RGT6 with several example projects from ST with the ST USB_Host and FATFS middleware provided. In every case I just constant USB interrupts that blocks all other operation.
2026-02-16 2:39 AM - edited 2026-02-16 2:41 AM
It is really unfortunate that the Nucleo Board STM32H563ZI does NOT support the user USB plug CN13 to act as USB Host.
So there is no way using this board to test how an STM32H5xx embedded device would work with USB sticks for example.
2026-02-16 2:54 AM
@PFlor.2 wrote:Why is host mode not supported on the STM32H563ZIT6 nucleo if it is supported by the chip?
via: https://www.st.com/en/evaluation-tools/nucleo-h563zi.html#documentation
I guess that limits it to Device only?
2026-02-16 3:17 AM - edited 2026-02-16 3:57 AM
afair
I used the user-usb as host...just you cannot expect its working as full USB-C !
To connect an usb-stick it will work, just use an adapter usb-C -> usb-A (as i did ).
And to get the needed 5V ...just put some jumpers on the block:
i have 3 jumpers on : 1-2 , 7-8 , 9-10 ; so you get vbus to the user usb , from st-link/debug usb.
Was this, with Azure usbx:
2026-02-16 3:21 AM
Hi! I understand your challenge, USB Host configuration on the STM32H5 can be tricky since online examples are limited. For your requirement, instead of relying solely on USB Host interrupts, you might want to poll the USB connection status using the USB OTG peripheral’s ID pin or VBUS detection. You can then toggle PB4 based on the connection status:
If VBUS is high (USB plugged in): set PB4 high to turn on the LED
If VBUS is low (USB removed) : set PB4 low to turn off the LED
Also, make sure PB4 is initialized as output and you’re using the correct HAL or LL functions for setting the pin.