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.
2026-03-22 2:54 PM - edited 2026-03-22 2:54 PM
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.