cancel
Showing results for 
Search instead for 
Did you mean: 

USBX and STM32U5 crash

TDJ
Senior III

I am unable to make working ThreadX USBX Host example for STM32U5 adopted for Nucleo-U575ZI-Q.
All, but the last setup step described in Introduction to USBX section 3.3 complete properly, but when finally HAL_HCD_Start() is called, ThreadX crashes. What could be wrong/missing?
System crashes even before OTG_FS_IRQHandler() is called. HSI48 clock has correct frequency, I measured it.

Screenshot 2023-09-18 113103.png

3 REPLIES 3
TDJ
Senior III

Problem solved. CubeMX does not recreate the correct required "startup_stm32u575zitxq.s" file, so file taken from the original example for the wrong MPU was used, with a different USB ISR handler name: OTG_FS_IRQHandler vs OTG_HS_IRQHandler.
Probably it is a CubeMX bug.

Hello @TDJ ,

Thank you for having reported this issue.

Which CubeMX version used? If possible, share you ioc file. We will try to reproduce your issue and raised the issue internally for working.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

I use the latest version 6.9.2. It is quite easy to reproduce. Just rename xxx.s file in /Core/Startup (STM32CubeIDE config) to something else and generate code again. The file will not be replaced or recreated if removed.