2026-05-12 3:14 PM
Hi everyone,
I am working on a project using the STM32H753ZI Nucleo-144 board. My goal is to save data to an external USB thumb drive via the CN13 (USB OTG FS) port.
My Environment:
RTOS Stack: ThreadX, NetXDuo (Ethernet is working), USBX (Host/Storage Class), and FileX.
Tools: STM32CubeMX v6.12/6.17 and IAR Embedded Workbench.
Clocking: Using HSI48 for USB, stabilized by the CRS (Source: LSE).
Hardware Configuration:
VBUS: Manually controlled via PD10 (STMPS2141). I have confirmed with a multimeter that 5V is present on the port when the software runs.
VBUS Sensing: Disabled in CubeMX (since I am driving power manually).
USB_OTG_FS Settings:
Mode: Host_Only.
Speed: Full Speed (12 MBit/s).
DMA: Disabled.
Interrupts: USB OTG FS global interrupt enabled (Priority 15).
The Issue: Despite the drive having power, the USBX stack does not seem to trigger the device insertion callback. I suspect the issue lies in the registration of the Host Controller Driver (HCD) or the link between the HAL interrupts and the USBX stack.
What I have implemented so far:
HCD Registration: I am calling ux_host_stack_hcd_register using the controller constant 6U (which corresponds to UX_HCD_STM32_CONTROLLER in my version of the header files).
Interrupts: I have linked the HAL HCD callbacks (HAL_HCD_Connect_Callback, etc.) to the _ux_hcd_stm32_interrupt_handler.
Memory: All USBX memory pools are located in AXI SRAM (DMA is off).
The Question: Is there a specific requirement for the H753ZI when using HSI48 + CRS in Host mode that I might be missing? Specifically, are there known issues with the 6U controller ID for the FS peripheral in the latest Azure RTOS USBX drivers?
Any help or sample initialization code for the H7 Host FS would be greatly appreciated.
Thank you
Solved! Go to Solution.
2026-05-14 1:28 AM - edited 2026-05-14 1:34 AM
Hello @SeoEngineer
For STM32H7 products, there are the 5MHZ and 6.25MHZ options.
I think 5MHZ will be most suitable one to create 48Mhz for USB
As for your code I recommend that you isolate the USB host functionality. Create a new project that includes only the USB component. In many cases, issues appear to be caused by synchronization problems, where each function works correctly in isolation but causes problems when combined. This test ensures whether the problem is in the USB itself or due to synchronization issues.
You can rely on this project as reference
BR
Gyessine
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.
2026-05-13 6:44 AM
Hello @SeoEngineer
Host functionality requires HSE as the USB clock source. HSI48 cannot provide a clean signal that meets host functionality requirements.
I recommend implementing an HSE clock and using it as the USB clock source.
BR
Gyessine
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.
2026-05-13 7:57 AM
Thank you @Gyessine .
I will test it with the ST-Link bypass. But, I am using a Nucleo board that lacks a populated HSE crystal. Additionally, since I will be powering the board via the VIN pin, the ST-LINK bypass clock source will be unavailable. Are there any alternative clocking configurations you would recommend?
Thank you so much.
2026-05-13 8:21 AM
Hi @Gyessine
I set up the HSE with bypass mode and configured the USB clock to 48 MHz, but it’s still not working. Do you have any other recommendations?
Thank you!
2026-05-13 8:53 AM
Hello @SeoEngineer
did you ensure that you configured the right HSE frequency in clock configuration
you can select 3 options using update mode.
You can open STlink upgrade window through STM32CubeProgrammer
BR
Gyessine
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.
2026-05-13 9:15 AM
Hi @Gyessine
Thank you so much for helping me.
The option has 8.33MHz not 8MHz. so I set up 8.33MHz, and it still does not detect the thumb drive. Does it have to be 8MHz?
Here is my code.
I call the usbx_init() function in app_netxduo.c/MX_NetXDuo_Init(VOID *memory_ptr) fucntion.
2026-05-14 1:28 AM - edited 2026-05-14 1:34 AM
Hello @SeoEngineer
For STM32H7 products, there are the 5MHZ and 6.25MHZ options.
I think 5MHZ will be most suitable one to create 48Mhz for USB
As for your code I recommend that you isolate the USB host functionality. Create a new project that includes only the USB component. In many cases, issues appear to be caused by synchronization problems, where each function works correctly in isolation but causes problems when combined. This test ensures whether the problem is in the USB itself or due to synchronization issues.
You can rely on this project as reference
BR
Gyessine
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.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.