2025-10-06 6:19 PM
I've been able to get USB Host working on Nucleo F767I board, but I can seem to get it working on STM32WBA65RI part. I've tried the following two boards combinations:
I've tried the following projects:
I've done all my builds (both the working F767 and failing STM32WBA) using STM32CubeIDE. I've been able to build, flash, and debug into the executable in all cases.
A fresh clone of STM32CubeWBA from github, I see the expected printed out:
USB Host library started.
Starting HID Application
Connect your HID Device
**** USB OTG HS in HID Host ****
However, plugging devices in CN9, does not result in them getting detected. Placing a breakpoint on _ux_hcd_stm32_interrupt_handler does not appear that it ever gets called.
2025-10-09 10:09 AM
Hi @noela
Have you tried device examples on the same board and could you confirm working without issues? Check that the Jumpers below are fitted: JP1 : 5V_USB Jumper is fitted in order to provide Vbus 5V.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-10-10 8:28 AM
I've run through a series of issues (power and iterating).
1- Placing the 5V_BUS jumper while still using the default 5V_STLK power causes some kind of power problem with my devices. I got it to work with a tiny USB-C card reader, but event my USB UART will cause the board to go red.
2- If I choose the example in STM32CubeMX and don't modify it, then generate a STM32CubeIDE project, I can load, build, and run with the card reader. I basically just detect it without adding support for storage. However, if I add other host classes, I run into problems.
* Adding Prolific and CDC_ACM means I exceed the 2 default classes. When I bump up UX_MAX_CLASS_DRIVER in the two header files, it still fails. Turns out the bulid doesn't correctly detect this change, and you need to do a clean build to fix it.
* Even after working, if I go back into the .ioc file with STM32CubeMX, and I enable other peripherals, USB will often stop working because the correct startup code is no longer generated.
* Tracking this down is problematic as for some reason, when I regenerated (I don't know if this is due to regenerating in STM32CubeIDE instead of exititing and regenerating from STM32CubeMX), but my diff shows that that the entire set of threadx, usbx, etc... sources are replaced. Even though it looks very similar. I believe the line endings are modified so it looks as if the files are basically new to my source control.