Skip to main content
Associate
August 14, 2025
Question

Stuck at USB Core Soft Reset

  • August 14, 2025
  • 2 replies
  • 465 views

I am trying to get USB High Speed running on my board, In the USB Core Soft Reset function, my code keeps on getting stuck in the do while loop that I have shown below. I have went through all the forum posts related to this and there has been no solution that has resolved this issue. The microcontroller series on this board is STM32U5A5RJT6. I would appreciate any guidance. Thank you!

 

 /* Core Soft Reset */
 USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST;

 do
 {
 count++;

 if (count > HAL_USB_TIMEOUT)
 {
 return HAL_TIMEOUT;
 }
 } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST);

 return HAL_OK;
}

 

2 replies

Technical Moderator
August 15, 2025

Hi @smartinez 

Did you take a look to this FAQ: Troubleshooting a USB core soft reset stuck?

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.Best regards,FBL
smartinezAuthor
Associate
August 15, 2025

Hello, 

Thank you for your response. Yes, we have taken a look at that article and have tried all of the solutions mentioned, but we will try again. Is there anything else that could be causing the issue?

 

Thank you so much!

Technical Moderator
August 18, 2025

Hi @smartinez 

I suggest you start with this example.

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.Best regards,FBL