Skip to main content
Visitor II
May 21, 2026
Question

STM32U5A5 USB Host with USBX: CONNECTION Event Triggered but No Device INSERTION

  • May 21, 2026
  • 1 reply
  • 54 views

Hello,

I have a custom board based on the STM32U5A5 microcontroller. I am trying to run a fingerprint reader sensor over USB on this board. For this project, I am using USBX Azure RTOS.

The configurations I made on the CubeMX side are as follows:

  • High Speed Clock: Crystal/Ceramic Resonator

  • LPUART1 for UART communication:

    • Mode: Asynchronous

    • Baudrate: 115200 Bits/s

    • PB10 -> LPUART1_RX

    • PB11 -> LPUART1_TX

  • USB_OTG_HS Mode and Configuration:

    • Internal HS PHY -> Host Only

    • PA11 -> USB_OTG_HS_DM

    • PA12 -> USB_OTG_HS_DP

    • Active_VBUS -> Disable

    • NVIC Settings -> USB OTG HS Global Interrupt: Enabled

  • PA9 GPIO Output enabled for USB power (I verified that the device is powered correctly.)

  • THREADX Mode and Configuration:

    • Core: Enabled

  • USBX:

    • Core System -> Enabled

    • UX Host HS -> Host CoreStack HS: Enabled

    • Host Controllers HS: Enabled

    • HID:

      • Core: Enabled

      • Keyboard: Enabled

      • Mouse: Enabled

Clock Configuration:

  • OTG HS Clock Mux: PLL1P enabled and set to 24 MHz (I also tried 16 MHz)

Project Manager:

  • Toolchain: STM32CubeIDE

  • MCU Reference: STM32U5A5ZJTxQ

  • Firmware Package Name and Version: STM32Cube FW_U5 V1.8.0

After these configurations, I generated the code. Then I enabled the GPIO for USB power output and verified that 5V is present on the USB line.

I also added some UART debug prints inside the ux_host_event_callback function in app_usbx_host.c.

After that, I connected several USB devices including:

  • the fingerprint sensor,

  • a mouse,

  • and a keyboard.

In all cases, the ux_host_event_callback function enters the CONNECTION event state, but it never reaches the INSERTION section.

At first, I thought the issue was related to the fingerprint sensor itself. However, seeing the exact same behavior with both the mouse and keyboard made me suspect that the problem is elsewhere. At this point, I am not sure what else I should try.

Does anyone have any suggestions or ideas about what could be causing this issue?

 

Best Regards,

Faruk

1 reply

Technical Moderator
May 22, 2026

Hi @Fega 

Could you please confirm whether you are able to reproduce the issue on the NUCLEO-U5A5ZJ-Q reference board?

If the behavior is reproducible there, could you also share a minimal firmware project that demonstrates the issue? This would help us isolate the root cause more efficiently.

Based on the symptoms, the issue can be related to the USB host configuration or the initialization sequence. 

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.Best regards,FBL