AnsweredAssumed Answered

STM32CubeMX USB Device generator bug

Question asked by Majerle.Tilen on Dec 18, 2016
Latest reply on Apr 20, 2017 by lewis.william

Today I played with CubeMX and USB CDC device and I found very silly bug in generated code.

 

I chose USB FS Device only mode and I used CDC class. Nothing else set. I did not enable VBUS.

 

Generated code enabled VBUS sensing but VBUS sense pin was not enabled.

I spent 2 hours to figure that out.

 

Please correct this mistake, disable VBUS sense by default or if you enable VBUS sense, then also initialize VBUS pin to sense voltage.

 

Have a nice day.

Outcomes