2025-09-18 12:53 PM
Hello everyone,
I’m facing an issue with an STM32L4-based design where the USB FS Device stack (CDC) sporadically fails to start correctly. Maybe someone has seen similar behavior or can point me to potential root causes.
System overview / setup
MCU: STM32L4 (CubeMX / HAL / FreeRTOS)
Clocking:
MSI as system clock (16 MHz)
USB via PLLSAI1 (48 MHz)
USB: FS Device Stack (CDC), initialized after HAL_Init() / SystemClock_Config() in the first Task
ESD protection: USBLC6-2SC6
Lines: no series resistors on D+ / D-
Observed behavior
On several boards, the USB stack does not reliably start after power-up.
In that case, the firmware blocks → Watchdog reset after ~8 s → endless reset loop.
Disconnecting/reconnecting the supply sometimes fixes the issue, and the USB connection to the PC works normally.
Interesting: When probing D+ or D- with an oscilloscope, the USB stack suddenly starts working – presumably because the probe affects the signal lines.
On another board with the same firmware, the issue never occurs.
Questions / assumptions
Series resistors on D+ / D-
Could the missing 22Ohm resistors be the root cause?
Does ST recommend these in general for STM32L4 designs (see e.g. USB tutorial on mikrocontroller.net)?
ESD protection (USBLC6-2SC6)
Could this component disturb the USB lines under certain conditions?
Layout / signal integrity
Are there known issues if USB differential pairs are not perfectly routed (impedance, symmetry)?
USB stack initialization
What exactly does the stack expect at startup?
Are certain voltage levels on D+ / D- required to be stable?
Looking for:
Experiences whether missing series resistors are really critical.
Layout recommendations for USB FS with STM32
Known pitfalls with ESD protection and USB initialization
Thanks a lot for any hints or ideas!
Best regards,
Martin