cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC not working with STM32CubeMX5.2.1 and stm32l151

Tulan
Associate

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Tulan
Associate

Found out the issue:

 __HAL_SYSCFG_USBPULLUP_ENABLE();

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

View solution in original post

1 REPLY 1
Tulan
Associate

Found out the issue:

 __HAL_SYSCFG_USBPULLUP_ENABLE();

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