cancel
Showing results for 
Search instead for 
Did you mean: 

USB_CoreReset Hangs on STM32H7S3L8 and STM32H753ZI Boards

AlexShao
Associate II

Hello everyone!

I am encountering an issue where USB_CoreReset hangs on both the STM32H7S3L8 and STM32H753ZI boards when configuring the USB_OTG_HS port.

I understand that this issue has been reported previously, and I have thoroughly reviewed most of the related posts over the past week. However, I have not found a solution that works for my case.

Configuration Details:

MacOS Sequoia 15.3.1 (Run IOC using: sudo /Applications/STM32CubeIDE.app/Contents/MacOS/STM32CubeIDE)

STM32CubeIDE Version: 1.17.0

STM32H7S3L8 Board

  • USB_OTG_HS enabled in Device mode
  • USB_HS_REGEN (USB Regulator) enabled
  • USB OTG HS interrupt enabled
  • Clock configuration:
    • HSE = 24 MHz
    • 60 MHz clock provided to USB_OTG_HS
  • RCC settings:
    • 'CRS SYNC' set to USB_HS
  • NVIC settings:
    • Global interrupt for USB enabled
  • USB_DEVICE enabled with Communication Device Class (CDC)

STM32H753ZI Board (NUCLEO-STM32H753ZI)

  • Configuration is the same as above, except that USB Regulator not enabled (not an option in IOC) 

Issue Description:

  • When running in debug mode, the code gets stuck in CoreReset, which is called from USB_CoreInit.
  • This behavior is consistent across both boards. 

Things I Have Tried

  1. Checking __HAL_RCC_SYSCFG_CLK_ENABLE(); in HAL_MspInit();

    • STM32H753ZI: Already initialized.
    • STM32H7S3L8: Not present; adding it results in "undefined" error.
  2. Reinstalling STM32CubeIDE

  3. Starting from a fresh workspace

  4. Commenting out __HAL_RCC_USB2_OTG_FS_ULPI_CLK_ENABLE(); in USBD_conf.c

    • STM32H7S3L8: This line does not exist in USBD_conf.c.
    • STM32H753ZI: Commented it out, but it did not resolve the issue

Question:

What could be causing USB_CoreReset to hang, and what steps can I take to debug or resolve this issue?

I have attached my IOC files for both boards for reference (STM32H7S3L8 is USB_init and STM32H753ZI is USB_initialization) Any insights or suggestions would be greatly appreciated.

Thanks in advance for your help!

1 REPLY 1
FBL
ST Employee

Hi @AlexShao 

This is common issue and could be due to compiler optimization, or PHY not being clocked or CPU frequency or USB internal regulator missing configuration in user application. If none of the above solved your issue, insert 10 clock cycles delay _DSP(); to avoid the issue.

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.