User Tools

Site Tools


arduino:stm32_blue_pill

This is an old revision of the document!


STM32 "Blue Pill"

Some quick notes about setting up a STM32F103C8T6 "Blue Pill" for development on Arduino.1)

Setup

Arduino environment

Do once:

Hardware

In addition to your “Blue Pill,” you will also need a 3.3V USB to serial converter. I used a SparkFun Serial Basic configured for 3.3V. Only the power, TX and RX pins will be used, so you should be able to use a standard FTDI board as well.

Some serial converter boards put out 5V as VCC even when set to 3.3V mode. Be careful!

Applying 5V to the 3.3V main supply line of Blue Pill will kill it.

There is a 5V input on the Blue Pill and a USB connector that can power the board from 5V. These go through a small 3.3V regulator.

Lots of pins on the STM32F103C8T6 are purported to be 5V tolerant, but the main DC isn't! I don't know if TX/RX are.

  • Connect VCC and ground from the serial converter board to the 3.3 and GND pins of the Blue Pill (or 5V and GND if your serial converter board puts out 5V even in 3.3V mode).
  • Connect the serial converter's RX to the Blue Pill's A9 and TX to A10.

Project config

Under the Tools menu, make the following selections:

  • Board : “Generic STM32F103C series”
  • Variant : “STM32F103C8 (20k RAM. 64k Flash”
  • Upload method : “Serial”
  • CPU Speed(MHz) : “72Mhz (Normal)”
  • Optimize : “Smallest (default)”
  • Port : wherever the serial converter is plugged into

Programming

  • Move the top jumper (i.e., the one furthest from the Reset button) to the 1 position (i.e., closest to the microcontroller).
  • Push reset.
  • Upload the sketch.
  • To re-upload, push reset and upload.

To put the device into “use” mode, move the top jumper back to 0 (left) position.

Resources

arduino/stm32_blue_pill.1558814029.txt.gz · Last modified: 2019/05/25 19:53 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki