Use STM32F103C8 as an Arduino On Steroids for less than $2

An all-in-one-place guide to prepare an STM32F103 to be used with the Arduino IDE.

0. Board Check

First of all, check the board. Most boards come with a wrong resistor value, which may cause some computers to not detect them. R10 must be changed to 1.5K (1.8K is ok).

1. STM32Duino Bootloader

Grab the bootloader binary precompiled for your board from rogerclarkmelbourne/STM32duino-bootloader . Check the built-in led pin, most likely it is generic_boot20_pc13.bin.

Connect an USB-2-Serial converter to USART1, PA9 (TX) PA10(RX). WARNING: Set the converter to 3.3V operation mode, usually by changing a jumper.

Change the BOOT0 jumper (the upper one) to 1 (right) and BOOT1 to 0.

Download the loader script from github at jsnyder/stm32loader . It’s a Python script so it must be installed before. You can find a Python3-ready version at bmpenuelas/stm32loader . Try to run it, if the serial module is not found, you can run:

pip install pyserial

When it’s ready, put the script and the bootloader in the same folder and run:

python ./stm32loader.py -e -w -v -p COM8 ./generic_boot20_pc13.bin

After the program confirms successful writing, put BOOT0 jumper back to 0.

 

 

These are the STM32F103 Windows drivers, run the .bat, it will handle the installation.

 

 

Sources and resources:
  • MBED boad and alternative programming methods and IDEs.