RobotDyn STM32F103C8 "BlackPill" does not retain program

Hi Folks

I am having a problem: after I upload the blinking led program to my RobotDyn “BlackPill” with STM32Duino bootloader and I unplug the usb cable, the board goes back to DFU mode for uploading and the program is lost.

This is my platform.ini:

platform = ststm32
board = blackpill_f103c8
framework = arduino
upload_protocol = dfu
upload_port = /dev/ttyACM0

Without the upload_port defined PlatformIO does not seem to find the board in DFU mode (normal?).

Any help would be very much appreciated.

Cheers, JW

The microcontroller boots either in DFU bootloader mode or runs the program store in flash and this is determined by the BOOT0 and BOOT1 jumper settings on the board.


SystemMemory = Bootloader code.

So, after doing a DFU upload, do you move BOOT0 back to 0, while BOOT1 is always kept at 0?

1 Like

Thanks @maxgerhardt, you solved my issue. I never put the BOOT0 pin back from high to low after uploading my program.