Programming STM32 via USB – Using CubeProgrammer

flashstm32

I have designed my own Board with an STM32F103 Chip. Now i want to add the feature that u can program the STM32 using USB connection. I watched the video https://youtu.be/VlCYI2U-qyM by Phil's Lab. I try to connect the Device with an USB, if this is done, in Device Manager (on Windows 11) the Device is Connected (the Power LED is lighting up) and listed as an Unknown Device.

When trying connecting the Board via the 'Connect' button in the CubeProgrammer, nothing happens and the following error message occurs.

enter image description here

Image as Text:

10:48:33 : UR connection mode is defined with the HWrst reset mode
10:48:33 : Error: Establishing connection with device failed

What I tried:
I set the BOOT0 Pin, High, like Phil's Lab says in his video. And then reconnected the board to the power. I also tried multiple ways of connecting. But nothing really worked.

Best Answer

It will not work, because the STM32F103 factory bootloader does not support USB DFU.

If you want to have USB DFU, you must first program a custom bootloader which enables you with DFU.

Related Topic