Skip to main content
HKaze.2
Visitor II
November 8, 2023
Question

USB CDC works on STM32G431 but not STM32L151

Hi,

 

I am trying to setup USB CDC as virtual COM port on STM32L151. I just enabled it through cubeMX and connected the wires. Windows keep saying device not recognized.

I just did the exact same thing with STM32G431. An empty project with just USB CDC enabled through cubeMX. The exact same wiring and it works.

I am quite confused and lost. Looked a lot in the web but so far no solution.

Does anyone know what could be the difference between these two micro that one works and the other not? Or where should I look?

Thank you

This topic has been closed for replies.

2 replies

KDJEM.1
ST Technical Moderator
November 8, 2023

Hello @HKaze.2 ,

Have a look to this FAQ: USB device not recognized, it may help you.

You can refer to the CDC example in the STM32CubeL1 firmware package and get inspired from the available one:

STM32Cube_FW_L1_V1.9.0\Projects\STM32L152D-EVAL\Applications\USB_Device\CDC_Standalone

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
waclawek.jan
Super User
November 8, 2023

The 'L1 USB requires an external 1k5 pullup on DP, similarly to 'F1 (see e.g. STLinkV2 schematics).

JW