Skip to main content
Visitor II
June 27, 2023
Solved

STM32U5Ax USB issue

  • June 27, 2023
  • 3 replies
  • 2550 views

I have a problem with USB initialization on those specific MCUs. Initialization function generated automatically by CubeMX hangs on USB_CoreReset function. Specifically on USB_OTG_GRSTCTL_CSRST bit which doesn't want to set after the reset. The Cube examples (which are working) use USBPD library only which source is not given so I can't see how initialization is done there.

With older USB32U5 where USB_FS phy is embedded everything works fine. Any ideas what should I change to make it working? My goal is to use it with tinyusb library since I don't want to use Azure RTOS or any RTOS in my project

    This topic has been closed for replies.
    Best answer by mpico

    Ok I solved that. It seems the problem is in SMPS my boards had included. If I switch it off everything works smooth. My guess is that HAL examples need more time to init the azure rtos and this small delay helps to solve this issue. Anyway USB works fine

    3 replies

    mpicoAuthorAnswer
    Visitor II
    June 27, 2023

    Ok I solved that. It seems the problem is in SMPS my boards had included. If I switch it off everything works smooth. My guess is that HAL examples need more time to init the azure rtos and this small delay helps to solve this issue. Anyway USB works fine

    Visitor II
    December 10, 2023

    I have also encountered the same problem, how to solve it!

    Super User
    June 27, 2023

    Thanks for coming back with the solution. Please click on "Accept as solution" in your post so that the thread is marked as solved.

    JW

    Visitor II
    December 10, 2023

    I have also encountered the same problem, how to solve it!thank you very much for your help!