STM32F411 Black Pill - Blink sketch not working

This is just a post to give information to new person having issues getting the standard blink sketch to work on a new STM32F411 Black Pill.

I followed online docs to setup the Arduino IDE and add the boards to the board manager. When plugging in the STM32 for the first time the blue led flashes, entering into USB DFU mode. The blink sketch uploads fine, but nothing happens with the stm32, no blink and my computer loses its com connection with the board. After spending about 4 hours troubleshooting, the issue was the STM32 Cube programmer version. I downgraded from v2.16 to v2.15 and presto! I read through a bunch of forum posts on ST forum, STM32duino, and on here. I went down the rabbit hole of looking at clock frequencies and was about to start with Platform IO. But really I just wanted to test these really quick so I could possibly use one later on down the road for a project. Trying to decide between the STM32 and ESP32... Anyway. It works now and back into my box of dev boards it goes.

Can you add some links which indicate that STM32 Cube programmer version v2.16 may give problems with Arduino ?

I don't have any links, just posting helpful information for someone who may run into the same issue.

Same problem here, my Blackpill just arrived today and whatever code I uploaded from Arduino IDE, it didn't do anything. I found the cause. STM32CubeProgrammer 2.16.0 does not erase the chip before programming. Even in its GUI, with "Skip flash erase before programming" unchecked, when I try to program a binary, the flash just gets overwritten without being erased first. Everything works fine when I click "Full chip erase" first and then upload my binary.

Thank you for this. After trying so many suggestions the "Full chip erase" finally worked for me.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.