cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H523 USBX Standalone HID Device Crashes on ux_slave_dcd_function

nifley
Associate

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.

nifley_0-1752558462510.png

nifley_1-1752558707376.png

I haven't changed the USBX configuration from the default aside from selecting these options.

Thanks, FB.

 

1 REPLY 1
MOBEJ
ST Employee

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

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.