2023-09-18 06:14 AM - edited 2023-09-18 07:21 AM
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.
2023-09-18 08:29 AM - edited 2023-09-18 08:29 AM
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.
2023-09-20 02:01 AM
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
2023-09-20 12:07 PM
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.