Strange 'bluepill' board

Dear Chinese friends sold to me a strange ‘bluepill’ which has STM32F103CBT6 MCU, that cannot be started with:

  • generic_stm32f103xx
  • maple_mini_b20
    … etc

That ‘bluepill’ program well via STLink utility and STLink USB dongle, I can write memory, erase memory, read memory, etc.

But:

General sketch, such as blink, not working at all.

Uploading .pioenvs\genericSTM32F103C8\firmware.elf
GNU MCU Eclipse 64-bit Open On-Chip Debugger 0.10.0+dev-00462-gdd1d90111 (2019-01-18-11:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
Info : clock speed 1000 kHz
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : STLINK V2J33S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.229005
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000380 msp: 0x20005000
** Programming Started **
auto erase enabled
Info : device id = 0x20036410
Info : flash size = 128kbytes
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0x20005000
wrote 40960 bytes from file .pioenvs\genericSTM32F103C8\firmware.elf in 2.313600s (17.289 KiB/s)
** Programming Finished **
** Verify Started **
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20005000
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20005000
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20005000
verified 40104 bytes in 0.674437s (58.069 KiB/s)
** Verified OK **
** Resetting Target **
shutdown command invoked

and then, no LED flashes.

What can I do with this ‘invalid’ MCU?

That is general code:

#include <Arduino.h>

void setup() {

  // put your setup code here, to run once:
  delay(20);
  pinMode(LED_BUILTIN, OUTPUT);



}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  delay(250);
}

Please state the full platformio.ini you’re working with. Have you tried replacing LED_BUILTIN with PC13?

1 Like

Exactly.

I even tried for… () pin Mode(I, output) no matters
All pins except usb are low

; PlatformIO Project Configuration File

;

; Build options: build flags, source filter

; Upload options: custom upload port, speed and extra flags

; Library options: dependencies, extra library storages

; Advanced options: extra scripting

;

; Please visit documentation for the other options and examples

; https://docs.platformio.org/page/projectconf.html

[env:genericSTM32F103C8]

platform = https://github.com/platformio/platform-ststm32.git

;board = genericSTM32F103CB

board = maple_mini_b20

framework = arduino

upload_protocol = stlink

board_build.mcu = stm32f103cbt6

board_build.variant=custom

lib_deps =