cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5Ax USB CoreReset timeout

MBirk.1
Associate II

Hi,

I am stuck on this issue on the STM32U5A9J-DK. I have ported the USB part from a H725 i have running. Where i have copied the init code from generated code.

In USB_CoreReset() the USB_OTG_GESTCTL_CSRST bit is never reset and hence a timeout occurs.

The OTG HS Clock mux is set to HSE, which is 16 MHz.

The OTG PHY ref. clock selection is set to 16 MHz.

 

1 ACCEPTED SOLUTION

Accepted Solutions
MBirk.1
Associate II

CubeMX does not generate an important function call:

__HAL_RCC_SYSCFG_CLK_ENABLE();

After adding this to HAL_MspInit() it works.

View solution in original post

2 REPLIES 2
MBirk.1
Associate II

CubeMX does not generate an important function call:

__HAL_RCC_SYSCFG_CLK_ENABLE();

After adding this to HAL_MspInit() it works.

You have no idea how long I have been trying to figure this out. Can confirm that CubeMX still does not generate the call.