Skip to main content
LPrat.3
Associate
September 25, 2021
Solved

STM32F411CE USB CDC BlackPill

  • September 25, 2021
  • 2 replies
  • 2835 views

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​

This topic has been closed for replies.
Best answer by LPrat.3

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 

2 replies

Pavel A.
Super User
September 26, 2021

> It not seems a hardware issue 

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

LPrat.3
LPrat.3Author
Associate
September 26, 2021

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

LPrat.3
LPrat.3AuthorBest answer
Associate
September 26, 2021

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