cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F411CE USB CDC BlackPill

LPrat.3
Associate II

I have a blackpill board with STM32F411 48 pins IC and CubeMX/CubeIDE at lastest versions. The USB is configured as device CDC, no Vbus.

When I flash the board with generated code ​and plug USB in Windows 10 I get an error "invalid device descriptor". I have increased heap to 0x1000 without success.

It not seems a hardware issue because I can enter the board in DFU and flash or erase device using CubeProgrammer.

Any help will be apreciated.

Leonardo​

1 ACCEPTED SOLUTION

Accepted Solutions
LPrat.3
Associate II

I found the solution, I have to increase the heap (0x1000), but this isn't enough to solve. I need to change the automatic clock configs of CubeMX that use internal 16MHz clock as source to core.

The image bellow show the way that works.

0693W00000FARupQAH.jpg 

View solution in original post

3 REPLIES 3
Pavel A.
Evangelist III

> It not seems a hardware issue 

Then there's an invalid device descriptor. Check with a bus analyzer.

But the automatic code generated by CubeMX isn't reliable?

LPrat.3
Associate II

I found the solution, I have to increase the heap (0x1000), but this isn't enough to solve. I need to change the automatic clock configs of CubeMX that use internal 16MHz clock as source to core.

The image bellow show the way that works.

0693W00000FARupQAH.jpg