cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C6T6 USB Bootloader Flash Issue

Kartik1004
Associate II

I've been previously programming the STM32F103C6T6 blue pill with an FTDI via UART and am now trying to flash a USB bootloader binary to program it directly via USB.
I've closely followed the guide on 
https://www.electrosoftcloud.com/en/stm32f103-bootloader-and-programming/ - I've successfully flashed the generic_bootloader_pc_13.bin file via UART, installed the required drivers, and followed the BOOT0 pattern correctly. On connecting via USB, the board is detected as "Maple DFU" in the Device Manager.

Kartik1004_0-1695959768385.png

But STM32CubeProgrammer keeps showing "No DFU detected" when I try connecting via USB and pressing the refresh button.

Kartik1004_1-1695959829733.png

However, when I enter the PID and VID specified in the Maple DFU driver properties shown below in STM32CubeProgrammer: 

Kartik1004_2-1695959884237.png

On refreshing and trying to connect, the error "unknown or unsupported device" is displayed:
Kartik1004_3-1695959973802.png

I've followed several online resources, and nobody seems to encounter this issue.
Can anyone provide any insights into why this might occur?

16 REPLIES 16
TDK
Guru

STM32CubeProgrammer is looking for the system bootloader DFU, not some other device (Maple DFU).

I recommend using stm32duino tools to interface with the device via their bootloader.

If you feel a post has answered your question, please click "Accept as Solution".

Oh, okay, thanks! But to program the device through STM32CubeIDE via USB, can I use a bootloader, or do I need to resort to UART/ST-LINK?

MM..1
Chief III

you decided to use stm cpu and ..cubeide, so you need a st-link to connect/debug.

if money is a problem, try a cheap st-linkV2 ("clone") stick , 3$ investment. (but buy only, where you can see some comments from buyers, this unit is working fine . there are many bad st-link-sticks, wont work with ide/debug. )

If you feel a post has answered your question, please click "Accept as Solution".

You can use the system DFU bootloader. Boot into it by holding BOOT0 high when you reset.

I recommend buying a Nucleo board and using that and program/debug via the SWD interface. Arduino tools aren't set up or intended to be used with STM32CubeProgrammer.

If you feel a post has answered your question, please click "Accept as Solution".

I have used ST-Link but am investigating if I can program via USB through the system bootloader.

Thanks for the suggestion - I've tried it but STM32CubeProg still shows No DFU detected. Do I need to uninstall the Maple DFU drivers from the system?
The device is shown as Unknown USB device (Device Descriptor Request Failed) in Device Manager

Kartik1004_0-1696085842839.png

 

Pavel A.
Evangelist III

So does your device show up with error as on the picture above, or as "Maple DFU"? The error shown above is not caused by any 3rd party driver, it is in the low level USB communication. Try a better cable and/or good USB 2.0 (not 3.x!) hub, better a powered one. If still shows up like above, your device (STM32) does not work.

The device shows as "Maple DFU" when I boot from the user flash with Arduino STM32 tools and with the error when I boot from the system DFU bootloader. One of the cables I tried was indeed causing problems, and I'll try a USB 2.x hub as my system has USB 3.x ports only. But why not USB 3.x?