Skip to main content
Associate III
September 13, 2024
Solved

How to interface or use STM32H563ZIT6 USB Host

  • September 13, 2024
  • 5 replies
  • 2004 views

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?

 

 

 

Best answer by Mike_ST

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.

 

 

 

5 replies

Associate III
September 13, 2024

sorry i Mis-understandingly mention the labels as STM32G0 Series.but The original Label is STM32H5 

Mike_ST
Technical Moderator
September 13, 2024

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:

STM32H5 SW package 

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.

 

Associate III
September 24, 2024

@Mike_ST 

>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?

Mike_ST
Mike_STBest answer
Technical Moderator
September 25, 2024

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.

 

 

 

Explorer
February 16, 2026

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.

AScha.3
Super User
February 16, 2026

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:

AScha3_0-1771240544814.png

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:

AScha3_0-1771242697488.png

AScha3_1-1771242912217.png

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
Visitor II
February 16, 2026

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.

Explorer
March 22, 2026

I don't know why the STM guys or the documentation didn't mention it but there is actually a github repository
from STM demonstrating how to setup the Nucleo STM32H563ZI as USB host on the User USB (CN13).

It is for the STM classic CoreMW USB stack.

Example Code is here:
https://github.com/STMicroelectronics/stm32h5-classic-coremw-apps/tree/main/Projects/NUCLEO-H563ZI/Applications/USB_Host/MSC_Standalone

I tried it and it works out of the box.