2023-09-28 09:13 PM
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.
But STM32CubeProgrammer keeps showing "No DFU detected" when I try connecting via USB and pressing the refresh button.
However, when I enter the PID and VID specified in the Maple DFU driver properties shown below in STM32CubeProgrammer:
On refreshing and trying to connect, the error "unknown or unsupported device" is displayed:
I've followed several online resources, and nobody seems to encounter this issue.
Can anyone provide any insights into why this might occur?
2023-09-29 06:09 AM
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.
2023-09-30 01:49 AM
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?
2023-09-30 03:03 AM
2023-09-30 03:45 AM - edited 2023-09-30 03:45 AM
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. )
2023-09-30 06:53 AM
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.
2023-09-30 07:47 AM
I have used ST-Link but am investigating if I can program via USB through the system bootloader.
2023-09-30 07:48 AM - edited 2023-09-30 07:58 AM
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
2023-09-30 08:57 AM - edited 2023-09-30 08:59 AM
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.
2023-09-30 09:07 AM - edited 2023-09-30 09:09 AM
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?