Skip to main content
Tulan
Associate
Jul 17, 2019 7:51 AM UTC
Solved

USB CDC not working with STM32CubeMX5.2.1 and stm32l151

I would like to migrate an older projekt based on stm32l151.

I created a new config with STM32CubeMX5.2.1 with firmware package STM32Cube FW_L1 V1.9.0. I used USB CDC to create a virtual COM. But I don't get any device listed on my Host PC.

I compared most of the code with the old projekt and everything seems similar.

Are there any known bugs for the stm32l151?

The compiled software runs (flashing LED via GPIO) but ony the USB stack seems not to work.

This topic has been closed for replies.
Tulan
TulanBest answer
Associate
Jul 17, 2019 12:18 PM UTC

Found out the issue:

 __HAL_SYSCFG_USBPULLUP_ENABLE();

did the job. Our Hardware specialists forgot to add Pullups to the USB D+ and D-.

1 reply

Tulan
TulanAuthorBest answer
Associate
Jul 17, 2019 12:18 PM UTC

Found out the issue:

 __HAL_SYSCFG_USBPULLUP_ENABLE();

did the job. Our Hardware specialists forgot to add Pullups to the USB D+ and D-.