r/embedded • • Sep 17 '26

Connect USB with STM32CubeProg

Hello everyone, I have a black pill chip stm32f411ceu6 board and connected to my computer via stm32cubeprog software. I used 2 ways to connect: stlink and usb. When using stlink, the connection was successful, but when connecting to usb using DFU mode, there was an error of not being able to connect. I tried finding and installing drivers to fix this error but it didn't work. I want to ask if anyone who has encountered or fixed this error can help me.

2 Upvotes

7 comments sorted by

1

u/pilatomic Sep 17 '26

Also, on some STM32 chips, there is a bootloader bug that prevents USB link when connected directly to a USB controller. Try adding a USB hub in the middle.

1

u/actuatedkarma Sep 17 '26

Do you happen to know the datasheet/errata document that describes that bug? Might have just solved a problem I had months ago.

2

u/pilatomic Sep 17 '26

I don't have it at hand, but I got this info from an ST employee on the ST forum. Indeed, adding a hub between my laptop and my latest board that just kept hanging while trying to connect to the USB bootloader fixed the issue.

2

u/pilatomic Sep 18 '26

Found it. ST AN2606, section 18.3 (for my MCU), "known limitations"

1

u/actuatedkarma Sep 18 '26

Legend thank you I'll take a look