Skip to main content
Graduate
August 27, 2025
Solved

USB FS unstable on STM32 when using HSI16 + HSI48 (USB3.0 host crash)

  • August 27, 2025
  • 2 replies
  • 358 views

Hello,

I am working on a low-power STM32 system. In my original configuration I was running the core at 32 MHz (PLL from HSI16) with Voltage Scaling 1, and in this setup USB CDC worked without any issues.

To reduce power consumption, I reconfigured the system to run the core at 16 MHz HSI (no PLL) while keeping Voltage Scaling 1. The USB clock source is HSI48.

With this configuration, when connecting to a USB 3.0 host port, the device often crashes during enumeration. Sometimes it enumerates fine, but most of the time it fails. Interestingly, if I connect the device through a USB 2.0 hub, the problem does not appear.

From my research, I found that:

  - USB 2.0 controllers are more tolerant and usually accept HSI48’s +/-1–2% drift.

  - USB 3.0 controllers are stricter, and if HSI48 drift exceeds +/-0.25%, CRC errors occur. This causes descriptors to get corrupted and Windows shows a crash or device not recognized.

My question:
What are the recommended ways to avoid this issue while still keeping the system in low-power mode (16 MHz core)? Should I:
  - Always use HSE + PLL for USB to guarantee clock accuracy?

  - Use CRS synchronization with LSE or USB SOF to stabilize HSI48?

  - Keep the system in Voltage Scale 1 only while USB is active?

Any advice from experience with STM32 USB on USB3.0 hosts would be appreciated.

Thanks!

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

    Hi @amorftor 

    For your USB Full-Speed low-power application, I recommend using CRS to synchronize HSI48 with LSE or USB SOF to improve clock stability although this requires more complex software handling.. For the highest accuracy, especially in high-speed USB, using HSE with PLL for the USB clock is preferred.

    2 replies

    Super User
    August 27, 2025

    Two options:

    • Using HSE + PLL will work.
    • Using HSI48 + CRS will also work. This is easier.

    Introduction to USB hardware and PCB guidelines using STM32 MCUs - Application note

     

    HSI48 alone will not satisfy the clock requirements for USB (2.0 or 3.0).

    FBLAnswer
    Technical Moderator
    August 29, 2025

    Hi @amorftor 

    For your USB Full-Speed low-power application, I recommend using CRS to synchronize HSI48 with LSE or USB SOF to improve clock stability although this requires more complex software handling.. For the highest accuracy, especially in high-speed USB, using HSE with PLL for the USB clock is preferred.