STM32F103C8T6 Blue Pill Development Board Pinout, Specs, Programming & Datasheet

Published:April 15, 2024

Prof. David Reynolds stands as a luminary in the field of electrical engineering, renowned for his expertise in integrated circuits. Holding a distinguished position as a Professor of Electrical Engineering, Prof. Reynolds earned his acclaim through decades of research, teaching, and industry collaboration.

The STM32F103C8T6 is a mid-range microcontroller unit of the STM32F103x8 family based on RISC architecture. The integrated Blue Pill Development Board was introduced as a low-cost alternative to STMicroelectronics STM discovery boards, priced around $2-3.

 

The STM32F103C8T6 microcontroller features GPIO pins, a processor, memory, a USB port, Analog-to-Digital Converters, and other peripherals. It boasts an ARM Cortex core with a speed of 72 MHz and impressive power efficiency. In this article, we'll explore the STM32F103C8T6 blue pill pinout, specifications, programming, datasheet, and more detail. Everything you need to know about the STM32F103C8T6 blue pill development board.

 

 

Overview of STM32F103C8T6 Blue Pill Development Board

The STM32F103C8T6 Blue Pill development board features a 32-bit Cortex-M3 RISC ARM core with an internal oscillator ranging from 4-16MHz, utilizing CMOS flash memory technology. With 37 GPIO pins and 10 analog pins, this chip offers versatile interfacing capabilities. Notably, the STM32F103C8T6 incorporates modern communication interfaces like CAN and USB ports. Operating at a low voltage, it enables peripherals to efficiently control the board, making it well-suited for low-power applications. Additionally, it includes an integrated watchdog and a windowed watchdog timer to ensure proper instruction execution.

The STM32F103C8T6 Blue Pill Development Board is a small and versatile microcontroller board based on the STM32F103C8T6 microcontroller unit (MCU) from STMicroelectronics. It is commonly referred to as the "Blue Pill" due to its blue PCB color and pill-like shape. The board is popular among hobbyists, students, and professionals alike due to its affordability, performance, and wide range of features.

 

STM32F103C8T6 Blue Pill Pinout

 

 

STM32F103C8T6 Blue Pill Pin Configuration

 

Pin Type Pin Name Description
Power 3.3V, 5V, GND
  • 3.3V – Regulated output voltage from the onboard regulator (drawing current is not recommended), can also be used to supply the chip.
  • 5V from USB or onboard regulator can be used to supply the onboard 3.3V regulator.
  • GND – Ground pins
Analog Pins

PA0 – PA7

PB0 – PB1

Pins act as ADCs with 12-bit resolution
Input/output pins

PA0 – PA15

PB0 – PB15

PC13 – PC15

37 General-purpose I/O pins.
Serial

TX1, RX1

TX2, RX2

TX3, RX3

UART with RTS and CTS pins
External interrupts

PA0 – PA15

PB0 – PB15

PC13 – PC15

All digital pins have interrupt capability
PWM

PA0 – PA3

PA6 – PA10

PB0 - PB1

PB6 – PB9

15 PWM pins total
SPI

MISO0, MOSI0, SCK0, CS0

MISO1, MOSI1, SCK1, CS0

2 SPI
Inbuilt LED PC13 LED to act as a general-purpose GPIO indicator
I2C

SCL1, SDA1

SCL2, SDA2

Inter-Integrated Circuit communication ports
CAN CAN0TX, CAN0RX CAN bus ports

 

Features of STM32F103C8T6

High performance: With an operating frequency of up to 72MHz, this chip boasts high-performance and floating-point computing capabilities, making it suitable for real-time and computation-intensive applications.

 

Rich peripherals: Featuring multiple built-in peripherals, including up to 39 GPIO, UART, SPI, I2C, timers, PWM, and more, it can adapt to various application scenarios.

 

Low power consumption: Equipped with a range of low power consumption modes, such as standby, hibernation, and shutdown, it effectively extends battery life, ideal for scenarios requiring low power consumption.

 

Abundant software support: Utilizing the ARM Cortex-M3 core, it is compatible with various development tools and software packages such as Keil, IAR, and CubeMX, ensuring high development efficiency.

 

High cost-effectiveness: It offers high cost-effectiveness, meets the requirements of economical applications, and is widely applicable in smart homes, the Internet of Things, embedded systems, and other fields.

 

STM32F103C8T6 Specifications

 

Type Parameter
Architecture Reduced Instruction Set
Pins 47
Analog inputs 10
Digital I/O pins 37
Operating voltage 3.3V
DC source/sink from I/O pins 6mA
Flash memory (KB) 64/128
SRAM 20KB
Frequency (clock speed) 72MHz max.
Serial line debugging 1
USB connector Micro
Analog to Digital Converter 2
Number of timers 7
Communication interface 9
USB module support
Working temperature -40℃~+105℃
Serial port module 3
Internal Oscillator 4-16 MHz
Window Watchdog Timer (WWDT) Support
JTAG debug interface 1
Communication I2C, SPI, UART, CAN, USB
I2C 8
SPI 8
Package / Case 48-LQFP

 

Description of Blue Pill

The Blue Pill is a 32-bit development board compatible with Arduino. It features the STM32F103C8T6 from the STM32 family of ARM Cortex-M3 core microcontrollers. This board is designed to introduce 32-bit ARM Cortex microcontrollers to hobbyists, adopting the Arduino-style form factor.

 

 

Powering the Blue Pill:

There are three methods for powering your Blue Pill development board:

  • Using the built-in USB micro connector.
  • Supplying 5V to the 5V pin as an external supply.
  • Supplying 3.3V directly to the 3.3V pin.

 

Input/Output:

The Blue Pill offers 37 GPIO pins distributed across four ports – A and B (16 pins each), C (3 pins), and D (2 pins). Each pin can sink/source a current of up to 6mA. Additionally, pull-up and pull-down resistors can be enabled on each pin.

Most pins also provide additional functionality:

  • Serial ports for UART protocol data transmission and reception.
  • I2C ports for two-wire communication using the IIC protocol.
  • SPI for serial communication.
  • PWM capability.
  • Pin 13 includes a built-in LED.

 

STM32F103C8T6 Blue Pill Schematic Diagram

The image below displays the schematic diagram for your reference. If your Blue Pill is damaged, you can use this schematic diagram to identify and replace faulty components.

 

 

How to Use the STM32 Development Board?

The Blue Pill can be programmed in two ways:

  1. Using an external USB/Serial converter connected to UART1 pins, which is the default bootloader for this family of boards. It can be programmed using the Arduino software this way.
  2. STLink USB Dongle: This uses the single-wire debug interface to communicate with the board. This allows it to be programmed using advanced software like Keil/CubeMX and allows memory access using the STLink software.

Before programming, it is important to connect the BOOT0 jumper to 1 and press the reset button to put the chip in 'programming mode.'

 

Other STM32 Boards: STM32 Discovery, STM32 Nucleo.

Other Development Boards: Arduino, Teensy, Raspberry Pi, ESP Modules

 

Uploading Your First Program

When programming using the Arduino software, start by downloading the appropriate board files using preferences and boards manager.

Next, select the correct board from the board's menu.

Because the built-in LED is on pin 13, similar to the Arduino, the basic blink sketch will work on the Blue Pill.

 

STM32 Blue Pill Programming Example (CubeIDE)

Here's a simple example of programming an STM32 Blue Pill board using CubeIDE to blink an LED:

  1. Open CubeIDE and create a new project for your STM32 microcontroller (e.g., STM32F103C8T6 for the Blue Pill).
  2. Configure the project settings and select the appropriate toolchain (e.g., STM32CubeIDE GCC).
  3. In the "Pinout & Configuration" tab, select the pin connected to the onboard LED (usually PC13) and configure it as a GPIO Output.
  4. Open the "main. c" file and add the following code:
  5. Compile the code and upload it to your STM32 Blue Pill board using the CubeIDE debugger.
  6. The onboard LED (PC13) should now blink at a 1 Hz rate.

 

STM32 Blue Pill Arduino Programming

To program an STM32 Blue Pill board using the Arduino IDE, follow these steps:

 

1. Install the Arduino IDE:

Download and install the Arduino IDE from the official Arduino website.

 

2. Install the STM32 boards package:

Open the Arduino IDE, go to File -> Preferences, and paste the following URL into the "Additional Board Manager URLs" field:

Then, go to Tools -> Board -> Boards Manager, search for "STM32," and install the "STM32 Cores" package.

 

3. Select the STM32 board:

Go to Tools -> Board and select "Generic STM32F1 Series" as the board.

 

4. Select the upload method:

You can use the STLink or the Serial method to upload code to the STM32 Blue Pill. For the STLink method, select "STLink" under Tools -> Upload Method. For the Serial method, select "Serial" and choose the appropriate port under Tools -> Port.

 

5. Write your Arduino sketch:

Write your Arduino sketch as you would for any Arduino board. Here's a simple example of blinking an LED connected to pin PC13 (the onboard LED on the Blue Pill):

void setup() {
  pinMode(PC13, OUTPUT);
}

void loop() {
  digitalWrite(PC13, HIGH);
  delay(500);
  digitalWrite(PC13, LOW);
  delay(500);
}

 

6. Upload the sketch:

Click the upload button in the Arduino IDE to compile and upload the sketch to your STM32 Blue Pill board.

 

7. Verify the sketch:

After uploading, the onboard LED should blink at a 1 Hz rate.

 

Note: The pin mapping for the STM32 Blue Pill may differ from the standard Arduino pin mapping. For the correct pin mappings, you may need to refer to the STM32F1 datasheet and the STM32Duino pinout diagram.

 

 

 

Simulating STM32 Blue Pill Board (in Proteus)

To simulate an STM32 Blue Pill board in Proteus, you'll need to follow these steps:

 

1. Download necessary files:

  • Download the STM32F1xx library for Proteus. You can find it on various websites or forums.
  • Download or create a HEX file of the firmware you want to simulate on the STM32 Blue Pill.

 

2. Install the STM32F1xx library:

Place the downloaded STM32F1xx library files in the "LIBRARY" folder of your Proteus installation directory.

 

3. Add the STM32 Blue Pill to your Proteus project:

  • Open Proteus and create a new project.
  • Search for "STM32F1" in the components library and add the STM32F103C8T6 to your schematic. This is the STM32 Blue Pill equivalent in Proteus.

 

4. Add other components as needed:

If your firmware interacts with other components (e.g., LEDs, buttons, sensors), add those components to your schematic as well.

 

5. Load the HEX file onto the STM32 Blue Pill:

  • Double-click on the STM32 Blue Pill component to open its properties.
  • In the "Program File" field, browse and select the HEX file of your firmware.
  • Click on "OK" to load the firmware onto the STM32 Blue Pill.

 

6. Simulate the circuit:

Run the simulation in Proteus to see how your firmware interacts with the STM32 Blue Pill and other components.

 

Please note that while Proteus can simulate the behavior of the STM32 Blue Pill and its interactions with other components, the simulation may not be 100% accurate. It's always a good idea to verify the behavior on actual hardware after simulating it in Proteus.

 

How to Program the STM32F103C8T6 Development Board?

There are currently two common methods to program the STM32F103C8T6 development board:

  • STLink USB dongle
  • External USB or serial converter

While there are many compiler options and IDEs available for writing programs and flashing code to the STM32F10C8T6 Blue Pill, these two methods are among the most popular and easy to use. Additionally, software like Keil/CubeMX and STLink is used for compiling and uploading the program. This is achieved through a single-wire debug interface designed for ARM cores, enabling transfers and memory accesses.

 

 

 

Development Environment

This microcontroller is compatible with Arduino software, allowing it to be programmed using the Arduino compiler. Arduino utilizes two compilers, avr-g++ and arm-none-eabi-g++. The code can be uploaded to the microcontroller via external USB using the UART1 pin.

To program the STM32F10C8T6 using the Arduino software, the correct board must be selected from the board menu within the software. Subsequently, download the necessary files for the board to enable efficient programming. Example sketches for Arduino, such as Blink, can be uploaded to the microcontroller as it features integrated LEDs for development purposes.

 

STM32F103C8T6 Application

Robotics

The STM32F103C8T6 is used in robotics for control systems, motor drivers, and sensor interfacing, enabling precise and efficient robot operation.

 

Rapid Prototyping

Its ease of use and wide range of peripherals make the STM32F103C8T6 ideal for rapid prototyping of embedded systems.

 

CRC Calculations 

The microcontroller is capable of performing cyclic redundancy check (CRC) calculations, which are used for error detection in data transmission.

 

Medical Systems

In medical systems, the STM32F103C8T6 is used for controlling and monitoring devices, ensuring accuracy and reliability in medical equipment.

 

Home Automation System

The microcontroller is used in home automation systems for controlling lights, appliances, and security systems, providing convenience and energy efficiency.

 

Low-Cost Embedded System

Its affordability and performance make the STM32F103C8T6 suitable for low-cost embedded systems in various applications.

 

Consumer Products

The microcontroller is used in consumer electronics such as smartwatches, fitness trackers, and remote controls, offering advanced features and performance.

 

Drone Controllers

STM32F103C8T6 is used in drone controllers for precise control and stability, ensuring the safe and efficient operation of drones.

 

Global Positioning System (GPS)

It is used in GPS devices for accurate location tracking and navigation.

 

Industrial Applications

The STM32F103C8T6 is used in industrial automation and control systems for monitoring and controlling machinery and processes, ensuring efficient and reliable operation.

 

STM32F103C8T6 Package

 

 

STM32F103C8T6 Datasheet

Download STM32F103C8T6 Datasheet PDF.

 

Blue Pill vs. Arduino Uno

 

Parameter Blue Pill Arduino Uno
Processor STM32F103C8T6 ATMega328P
Architecture ARM Cortex-M3 AVR
Operating/input voltage 3.3V 5V
CPU speed 72MHz 16MHz
Analog pins 10 8
Digital IO/PWM 37 14
EEPROM/SRAM(KB) -/20 1/2
Flash 64/128K 32K
USB Connector Micro Type B
UART 3 1
SPI 2 1
I2C 2 1
ADC Resolution 12-bit 10-bit
Development Environment Arduino IDE, STM32CubeIDE Arduino IDE

The STM32F103C8T6 Blue Pill offers a more powerful ARM Cortex-M3 architecture with higher clock speed, more flash memory, and SRAM compared to the ATMega328P-based Arduino Uno. It also provides more digital and analog pins, as well as additional features like more UART, SPI, and I2C interfaces, and higher ADC resolution. However, the Arduino Uno has the advantage of being more beginner-friendly and having a larger community and ecosystem.

 

Blue Pill vs. Nucleo-F401

 

Parameter Blue Pill Nucleo F401
Processor STM32F103C9T6 STM32F401RET6
Architecture ARM Cortex-M3 ARM Cortex-M4
Operating/input voltage 3.3V 3.3V
CPU speed 72MHz 84MHz
Analog pins 10 16
Digital IO/PWM 37 50
EEPROM/SRAM(KB) 20 96
Flash 64/128K 512K
USB Connector Micro Mini B
UART 3 4
SPI 2 3
I2C 2 3
ADC Resolution 12-bit 12-bit
Development Environment STM32CubeIDE, Arduino IDE STM32CubeIDE, Keil, IAR

 

The STM32F103C9T6 Blue Pill features the ARM Cortex-M3 architecture with a clock speed of up to 72 MHz, 64 KB of flash memory, and 20 KB of SRAM. It offers 37 digital I/O pins, 10 analog input pins, and various communication interfaces like UART, SPI, and I2C.

On the other hand, the STM32F401RET6 Nucleo F401 features the more advanced ARM Cortex-M4 architecture with a clock speed of up to 84 MHz, 512 KB of flash memory, and 96 KB of SRAM. It offers 51 digital I/O pins, 16 analog input pins, and similar communication interfaces.

The Nucleo F401 also includes additional features like USB support, a bootloader for easy firmware updates, and a wider operating voltage range. However, it is priced slightly higher than the Blue Pill. Both boards are readily available and are suitable for various embedded applications.

 

STM32F103C8T6 vs. Other MCU

 

MCU CPU Frequency Flash Memory RAM Package
STM32F103C8T6 72 MHz 64 KB 20 KB 48-pin LQFP
STM32F103ZET6 72 MHz 512 KB 64 KB 144-pin LQFP
STM32F103RCT6 72 MHz 256 KB 48 KB 64-pin LQFP
STM32F103C6T6 72 MHz 32 KB 10 KB 48-pin LQFP
STM32F103VET6 72 MHz 256 KB 64 KB 100-pin LQFP

 

Conclusion

In conclusion, the STM32F103C8T6 Blue Pill development board offers a powerful and versatile platform for embedded systems and DIY electronics projects. Its ARM Cortex-M3 processor provides efficient processing capabilities, while its rich set of features and specifications make it ideal for a wide range of applications. The STM32F103C8T6 Blue Pill's significance in embedded systems lies in its ability to provide a cost-effective and flexible solution for prototyping and development.

 

Read More

Get Instant Online Quote

FAQ

  • What is a blue pill pinout?

    The Blue Pill board features 4 ports with a total of 37 GPIO pins. Ports A and B each have 16 pins, while Port C and Port D have 3 pins each.

  • What are the pins of the STM32 blue pill?

    This microcontroller has 37 general-purpose input/output (GPIO) pins and 10 analog pins.

  • What is the frequency of the blue pill crystal in STM32?

    The Blue Pill board features an external 8MHz crystal, which serves as the external clock (HSE).

  • What is the power consumption of STM32F103C8T6?

    The typical current consumption of the STM32F103C8T6 is 1.4 µA at 3.3 V.

  • Why use STM32 instead of Arduino?

    STM32 microcontrollers provide greater processing power, expanded memory capacity, and higher clock speeds than Arduino boards, making them well-suited for more advanced applications.

Still, need help? Contact Us: [email protected]

You need to log in to reply. Sign In | Sign Up

Please enter your content

Subscribe to our communication service and stay in real-time sync with the latest updates on our website