WeAct BlackPill 3.0

I have just got into STM32 blue/black pills. I installed the STM32Cube sw and then the ST STM32 in PlatformIO. I am running Code on linux Mint 20.

First I tried the blue pill, wired it up with a USB to TTL convert on A9 & A10. Loaded up the obligatory blink code and uploaded it no problem.

Moving over to the blackpill (WeAct BlackPill 3.0), first minor problem the choice of boards had WeAct BlackPill v2.0 but not 3.0 so I went ahead with 2.0. Next, the USB is supposed to work for uploading so in platformio.ini I had:

[env:blackpill_f411ce] platform = ststm32 board = blackpill_f411ce framework = arduino upload_protocol = dfu

Tried to upload and all I got was:

dfu-util: Invalid DFU suffix signature dfu-util: A valid DFU suffix will be required in a future dfu-util release!!! dfu-util: No DFU capable USB device available *** [upload] Error 74

I tried various build_flags to no avail so I wired up the USB to TTL board, changed the upload _protocol to serial and tried the uploaded and got:

Configuring upload protocol... AVAILABLE: blackmagic, cmsis-dap, dfu, jlink, serial, stlink CURRENT: upload_protocol = serial Looking for upload port... Auto-detected: /dev/ttyUSB0 Uploading .pio/build/blackpill_f411ce/firmware.bin Unknown/unsupported device (Device ID: 0x431) stm32flash Arduino_STM32_0.9

Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1

*** [upload] Error 1

This was last nite. This afternoon I had another go at it. changed the upload_rotocol to dfu and hit upload. It worked!! The only difference was that the USB to TTL board was still wired up. As there are only 2 connections to the board I tried uploading with one and then the other connected. Uploading work with A10 connected. I then tied A10 to 5v and I could still upload via USB.

Has anybody else used the WeAct BlackPill 3.0? Can anyone explain what’s going on here?

Did you hold down the “BOOT0” button while inserting the USB connection of the device? Or did a hold-BOOT0 and press RST procedure? The chips are only flashable via serial or USB when they’re executing the embedded bootloader, and that’s the way to run it. See this article, too.

I use blackpill_f411ce v2 of the same STM32.

You can use the method indicated by @maxgerhardt or better still get hold of a ST-Link or a J-Link probe. A ST-Link can be purchased for $2-$3 from several online stores.

I think I only used the USB method a couple of times when I first started on the blackpill_f411ce. I use ST-Link all the time, works great for uploads & debug.

I have been holding down BOOT0 and then pressing NRST. When I tie PA10 HIGH then upload works. If PA10 is not connected to anything then upload does not work and I get the Invalid dfu message. I didn’t know about the hold BOOT0 while inserting the USB, so I just tried it and got the same results depending on if PA10 is held HIGH or not.

I’ve ordered an ST-Link to see how it works out.

Per WeAct Studio Black Pill V3.0 — Zephyr Project Documentation the PA10 pin is the “USB FS_ID” pin. FS should stand for full-speed (USB) and the ID pin is what identifies the device is a USB host or as a USB device. Maybe there’s a fault in the USB-C to USB-something adapter that you may be using? Or it isn’t properly routed on the board?

You’ll be fine with the ST-Link.

Just out of curiosity, Where did you purchase your WeAct BlackPill 3.0? I noticed that Adafruit (STM32F411 BlackPill Development Board : ID 4877 : $29.95 : Adafruit Industries, Unique & fun DIY electronics and kits) now sell them, though out of stock currently. I have a couple of the v2 boards but the next one will be a v3.

I got it of ebay for £8.35 'cos I wanted it in a hurry. I’ve order more from AliExpress at a more reasonable £2.84.

I think you’re right, the USB-C plug is quite a tight fit and the socket is feels like I could easily rip it off the pcb while pushing in the plug.

Yup! ~£3. I just reviewed my last batch of STM32 MCUs. In fact, the last one I purchased is a v3. Same STM32 as v2, no real differences.

I have hardly ever use the USB-C connector on the blackpill_f411ce, just ST-Link.

Under Zephyr, I use nRF52840 (particle_xenon, Nordic Dongle), bbc_microbit_v2, and STM32 (blackpill_f411ce). All great devices.

It’s pity that the bbc_microbit_v2 isn’t based on the nRF52840 but the nRF52833 is just one below and pretty good, plus has an onboard probe ( default CMSIS-DAP but I reflashed it with J-Link) plus a bunch of sensors.

Dammit!! I thought I had a usb-a mf cable, so I’ve ordered one of Amazon, arrives tomorrow…

I mostly mess around with ESP32’s and the odd Nano here & there. Just started to play with the STM32’s as I like the speed and # of gpio’s, but don’t always need the wifi or bt.

Haven’t looked at Zephyr yet… is it worth installing? Any advantages over the vscode & pio combo?

Zephyr does have somewhat of a learning curve with the devicetree but well worth the effort. I use PlatformIO and Zephyr combo most of the time.

I have quite a few esp8266, esp32, and nRF24 Nano (all using the Arduino Framework) deployed and in the works, the Zephyr & PlatformIO / nRF52840 / STM32 combo is superb for development & deployment. With Nordic Semi & many others standardizing on Zephyr, it has a great future.

All, so inexpensive, cool target development that used to cost over £1K back in '80s!