USBX Host Controllers FS activation causes HAL_HCD_Disconnect_Callback failure
Dear ST Community,
I'm experiencing an issue with USBX Host implementation on STM32H573RIT6 where disconnect events stop working after enabling Host Controllers FS in CubeMX.
Problem Description
Environment:
MCU: STM32H573RIT6 (Custom board)
Middleware: Azure RTOS USBX + FileX (MSC Host)
VBUS: External constant 5V supply (no USBPD/VBUS sensing used)
Connection detection: DP pin based
CubeMX: UX Host FS + Host Controllers FS enabled
HAL setting: hhcd_USB_DRD_FS.Init.vbus_sensing_enable = DISABLE

Behavior:
Before USBX activation: Both HAL_HCD_Connect_Callback() and HAL_HCD_Disconnect_Callback() work perfectly with USB memory stick connect/disconnect
After USBX Host Controllers FS activation:
Initial USB memory connection: HAL_HCD_Connect_Callback() works fine
USB memory removal/reconnection: No HAL_HCD_Connect_Callback() and
HAL_HCD_Disconnect_Callback() called
Questions/Requests
- How to maintain HAL HCD callbacks when using USBX Host Controllers FS?
- Recommended settings for VBUS Sensing Disable + DP pin detection environment?
- Method to restore Disconnect events after Host Controllers FS activation?
- Differences between STM32H5 + USBX official examples and my configuration?
I suspect USBX Host Controllers FS activation is somehow weakening or overriding the HAL HCD handler's disconnect detection capability. Any insights or known workarounds would be greatly appreciated.
Thank you for your assistance.
Best regards,
Hosung han.
