2026-05-21 7:25 AM
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
2026-05-22 3:37 AM
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.
2026-06-01 4:40 AM
Hello FBL,
I do not currently have the Nucleo board on hand. I have already ordered it, but it has not arrived yet. My first goal is to perform testing once the board arrives. In the meantime, I can continue working in parallel on the custom board.
Additionally, I had to switch the project back to standalone mode because I will be importing the USB functionality into a standalone project. At the moment, I am able to use both a mouse and a keyboard as USB host devices on the STM32U5A5. Through UART, I can read keyboard key presses as well as mouse position data and button events such as left-click and right-click. I have now moved on to testing the fingerprint reader sensor.
I am trying to move forward by comparing the mouse and fingerprint sensor information using USB Device Tree Viewer. The descriptors I am comparing include the HID Descriptor, Interface Descriptor, and Endpoint Descriptor. In the Endpoint Descriptor, both devices show the following:
bEndpointAddress : 0x81 (Direction=IN EndpointID=1)
bmAttributes : 0x03 (TransferType=Interrupt)The only noticeable difference I can see is that the mouse has a String Descriptor, whereas the fingerprint sensor shows "None" for the String Descriptor.
When I connect the mouse, the ux_host_event_callback function enters the UX_HID_CLIENT_INSERTION (0x03) event as expected. However, when I connect the fingerprint reader sensor, this event is never triggered.
My expectation was that both devices would generate the same UX_HID_CLIENT_INSERTION event since they both appear to use an interrupt endpoint. Do you have any ideas about why this might be happening or what additional checks I should perform to diagnose the issue?
Any suggestions would be greatly appreciated. I added my project. Thank you for helping.
Thank you.
Best regards,
2026-06-01 9:50 AM
Hi @Fega
I assume the fingerprint sensor is not matching the same HID class handling as the mouse, most likely because of differences in the HID report descriptor, interface protocol/subclass, or device-specific HID behavior, rather than because of the string descriptor. You need to check the specifications of your USB fingerprint sensor. Even if both devices expose an interrupt IN endpoint, the HID class handling can still differ if the fingerprint sensor uses a different HID profile or report structure.
It would also be very helpful to attach a USB trace of the fingerprint sensor connection and enumeration sequence. That will allow further investigation of what happens during descriptor parsing and HID class initialization.
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.