2025-07-14 10:54 PM
I am building a device using a STM32H523RET6 microcontroller on a custom board (self-powered, with VBUS detection). My eventual goal is to operate a USB-CDC interface between the board and a computer for telemetry, but since the only standalone USB example I could find in the STM32CubeH5 examples was HID, I am trying to get a HID interface working first. I do not want to use the RTOS for my device. I have attempted to adapt the code from this example, https://github.com/STMicroelectronics/STM32CubeH5/tree/main/Projects/NUCLEO-H563ZI/Applications/USBX/Ux_Device_HID_Standalone to the H523 device, but the program crashes in the function _ux_device_stack_tasks_run when the function ux_slave_dcd_function is called. As you can see from the stack trace, this is called from the USBX_Device_Process() function which is periodically called. I have been unable to find any detailed information or examples pertaining to USB on the H523 device, so any information or pointers would be amazing.
I haven't changed the USBX configuration from the default aside from selecting these options.
Thanks, FB.
2025-07-15 1:25 AM
Hello @nifley ,
Please take a look at this article: "How to implement a USB device composite in STM32H5 microcontrollers". It provides a detailed guide that can help you configure your project using STM32CubeMX .
Br