I've been tinkering with some STM32F1 boards since 2 weeks now. I want to use them for a project but seem to fail to program anything (except a blink through ST-link).
First I purchased some counterfeits from ali (Device ID 414 & 256kB flash on a C8 48pin model is not official STM32F1) but then I stumbled unto the WeAct seller who apparently use genuine chips, after connecting through ST-link it seems to be the truth (good reviews, device id 410, C8 with 64kB, printing on chip looks legit) they call it "BluePill plus".
It came with a USB bootloader installed (slow blink LED & showed up as Mass storage device with 2/8kB available space). I'd like to program through arduino IDE so downloaded the HID bootloader. Unfortunately my arduino IDE does not seem to be able to upload to the device.
I searched the forums for a solution but everything I tried has led to the same result:
Code: Select all
Sketch uses 23948 bytes (36%) of program storage space. Maximum is 65536 bytes.
Global variables use 4392 bytes (21%) of dynamic memory, leaving 16088 bytes for local variables. Maximum is 20480 bytes.
Failed uploading: no upload port provided
Different methods of uploading bootloader:
- Bootloader mode by pressing Boot0 (onboard LED does not flash) > Connect ST-link to PC > downloaded .bin (STMprogrammer [Full chip erase, download file, verify, software reset enabled) > Boot 0 not pressed (Becomes pulled down: GND through 10k R) > press reset.
That works (LED fast blink & see attached image of USB viewer)
- Bootloader mode by pressing Boot0 & PA0 (onboard LED does not flash) > Connect ST-link to PC > downloaded .bin (STMprogrammer [Full chip erase, download file, verify, software reset enabled) > Boot 0 & PA0 not pressed (PA0 becomes floating, and Boot0 becomes pulled down: GND through 10k R) > disconnect.
It gives the same result as pressing only Boot0, as expected (STM's AN2606 Application note page 22 says both are a pattern to enter bootloader).
Differet methods of uploading Blink:
- (after downloading with STlink) Arduino IDE > connect USB C cable > settings as in image > download BLINK (proviced by WeAct, onboard LED = PB2) > error.
- (after downloading with UART converter)Arduino IDE > connect USB C cable > settings as in image > download BLINK (proviced by WeAct, onboard LED = PB2) > error.
- (after downloading with UART converter)Arduino IDE > connect USB C cable > Press and hold boot0, hit reset once (LED turns off) > settings as in image > download BLINK (proviced by WeAct, onboard LED = PB2) > error.
Items used:
- STM32F103C8T6 BluePill+ from WeAct: https://nl.aliexpress.com/item/10050049 ... pt=glo2nld https://github.com/WeActStudio/BluePill-Plus
Schematic through dropbox: https://www.dropbox.com/scl/fi/j3pk43uv ... 7x179&dl=0
- ST link V2 (probably clone, but has been working without fail)
(AZDelivery CP2102 USB to TTL converter)
- STMprogrammer to flash HID bootloader
- HID bootloader provided by WeAct (their LED is on PB2)
- Arduino IDE 2.3.1 (& now downgraded to 2.2.1, to see if it fixes anything)
- ST32M (official) core: https://github.com/stm32duino
- USB C data cable (I can upload from phone with the same cable)
Arduino settings used:
I can find the device in device manager under HID devices (named: USB input device), and USB device viewer can read the HID bootloader on it.
I have no clue where to look, would someone be so kind as to help me with this issue?