This is an old revision of the document!


STM32duino - Blue Pill F103C8

The STM32duino board is based on the ARM Cortex M3 core like the Arduino Duo. The version I use is the Blus Pill.

On Hackaday is a good article about STM32 clones: STM32-Clones - the good the bad and the ugly.


USB Fix

Unfortunately the board comes with a 10k pullup resistor from D+ to 3.3V (in the schematic it's a 4.7k). That can cause problems on some PCs. Just take the R10 out and replace it with an 1.5k resistor like shown here:
http://wiki.stm32duino.com/index.php?title=Blue_Pill#Hardware_installation
One might let the 10k resister untouched and just put a 1.8k in parallel. Between 3.3V and pin A1 (PA12).

And here are some useful infos about the pullup resistors on USB:
https://www.beyondlogic.org/usbnutshell/usb2.shtml


Schematic

Here one find the schematic.
Pinout:


Specification

 Model: STM32F103C8T6
 Core: ARM 32 Cortex-M3 CPU
 Debug mode: SWD
 72MHz work frequency
 64K flash memory
 20K SRAM
 2.0-3.6V power, I/O
 Reset(POR/PDR)
 8MHz crystal
 LED on pin PC13

Software

I2C over VGA

One can use the I2C bus from the VGA connector.


I2C on the VGA Connector

How to acces the I2C Bus:

or use the VGA Breakout Board.


Workaround

A workaround for Arch Linux:

Add the I2C kernel module:

 $ sudo modprobe i2c-dev

Check your I2C devices:

 $ ls /dev/

You should find somthing like: i2c-0 i2c-1 i2c-2 …
Install the I2C tools:

 $ sudo pacman -S i2c-tools

or on Debian:

 $ sudo apt-get install -y i2c-tools

Find your device:

 $ i2cdetect -l

The result could look like:

  i2c-1	unknown   	i915 gmbus vga                  	N/A

Looking for an I2C device

 $ sudo i2cdetect -y 1

It should tell you the address of your I2C device.
Now you can comunicate to your devices with these commands:

 $ i2cget
 $ i2cset
 $ i2cdump

Links

License

This manuals is made by Wolfgang Spahn 2018-20.
It is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Creative Commons License