STM32U5Ax USB CoreReset timeout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-14 06:52 AM
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.
Solved! Go to Solution.
- Labels:
-
STM32U5 series
-
USB
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-01 01:39 AM
CubeMX does not generate an important function call:
__HAL_RCC_SYSCFG_CLK_ENABLE();
After adding this to HAL_MspInit() it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-01 01:39 AM
CubeMX does not generate an important function call:
__HAL_RCC_SYSCFG_CLK_ENABLE();
After adding this to HAL_MspInit() it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-08 01:20 PM
You have no idea how long I have been trying to figure this out. Can confirm that CubeMX still does not generate the call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-27 03:33 PM
st32F4 version 1.28.0 seems to insert the correct code, but I have the same issue. so far I just have base compiler generated code and the hang is in initialization. Any other suggestions?
Is this error completely internal setup, or could it be a hardware issue with the usb chip, we are usingusb3300-ezk-tr
this is a new pcb and a processor I'm not familar with
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-19 09:29 PM
I can confirm that I have the same issue with a project built with HAL 1.28.0 for F4.
USB_CoreReset() always times out which prevents the USB stack from getting initialized. I have generated another project with basic code for testing, USB MSC in host mode, FS internal PHY, FreeRTOS, and it works just fine on the same base F4 board. So, it's a software/configuration issue that has nothing to do with the hardware or board used.
By going back to CubeMX (1.28.0 in my case) and generating the code again, but this time with 'Activate_VBUS' disabled, the problem disappeared and now USB initializes and works successfully.
Yet I need to figure out why activating VBUS caused this problem on one project while it worked with another one.
Again, this for MSC with 'HOST_ONLY' USB in FS mode (internal PHY)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-05 07:28 AM
I can confirm that to this date, using CubeMX 6.12.1 and STM32 U5 FW 1.6.0 the error still persists.
The workaround solves the problem for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-20 02:14 PM - edited ‎2025-02-20 03:03 PM
Hello! I've been struggling with this problem and stumbled on your post.
I tried your solution. However, when I pasted __HAL_RCC_SYSCFG_CLK_ENABLE(); into HAL_MspInit(void) it returns the error "Undefined reference to '__HAL_RCC_SYSCFG_CLK_ENABLE();'".
Here is some additional information:
Using STM32H7S3R8
I am using device mode for USB HS
60MHz going into USBOHS.
USB OTG global interrupt enabled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-21 03:51 AM
STM32H7S/R require enable USB HS power:
CubeMX -> Power and Thermal -> PWR -> USB_HS_REGEN = Enabled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-21 10:11 AM - edited ‎2025-02-21 10:26 AM
Quick update on my IOC configuration.
1. Enabled USB_HS_REGEN
2. In 'RCC' set 'CRS SYNC' to 'CRS SYNC Source USB' *
3. In 'NVIC' enable the global interrupt for USB *
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-21 10:16 AM
Thank you for the response WojRus!
I have enabled USB_HS_REGEN. However, the same issue still occurs in USB_CoreReset(), any other insights that might solve the issue?
Which documentation explains that you need to enable USB_HS_REGEN, and where can I find it?
