STM32 Blue Pill Pinout & Programming Guide – DeepBlue (2024)

In this article, you’ll find the STM32 Blue Pill Pinout Diagramfor both blue pill boards based on the STM32F103C8T6 & STM32F103C6T6. You’ll also learn how to program & simulate STM32 Blue Pill Projects with STM32CubeIDE, Arduino IDE, and Proteus ISIS software. Without further ado, let’s get right into it!

Table of Contents

  1. STM32 Blue Pill Pinout Diagram
  2. STM32 Blue Pill Board Features
  3. STM32 Blue Pill Programming Example (CubeIDE)
  4. STM32 Blue Pill Arduino Programming
  5. Simulating STM32 Blue Pill Board (in Proteus)
  6. Wrap Up

STM32 Blue Pill Pinout Diagram

The STM32 Blue Pill board comes in two variations; One is based on the STM32F103C8T6 target microcontroller, and the other is based on the STM32F103C6T6. They both have the same board layout and pinout diagram, the differences between the target microcontrollers are the internal specs of the MCU (like RAM, ROM, Peripherals, etc).

STM32 Blue Pill Pinout & Programming Guide – DeepBlue (1)

Blue Pill Pinout Diagram (STM32F103)

STM32 Blue Pill Pinout & Programming Guide – DeepBlue (2)

❕ Note

Not all GPIO pins on the STM32 blue pill board are 5v tolerant. To keep everything on the safe side, you need to use a 3.3v logic level on all GPIO lines so you don’t over-drive any IO line by mistake.

STM32 Blue Pill Board Features

The two variants of the STM32 blue pill boards share the same “board features” which are as follows:

  • 32x GPIO Pins
  • RESET Button
  • On Board LED (C13)
  • BOOT Select Jumper
  • 8MHz HSE Crystal Oscillator
  • FS USB Port: D-(A11), D+(A12)

The differences between both target microcontrollers are the internal specs like memory space, peripherals count, and so on. Below is a table that summarizes the differences between the STM32F103C8T6 and the STM32F103C6T6.

STM32F103C8T6 Vs STM32F103C6T6

FeatureSTM32F103C8T6STM32F103C6T6
FLASH (ROM)64kB/128kB16kB/32kB
RAM20kB6kB/10kB
UART32
SPI21
I2C21
Timers76

Buy an STM32 Blue Pill Board: ( Amazon / AliExpress / eBay )

STM32 Blue Pill Programming Example (CubeIDE)

The tutorial linked below is a very good starting point for your journey with STM32 microcontrollers. You’ll learn how to program the STM32 Blue Pill board to blink an LED using the STM32CubeMX & STM32CubeIDE toolchain.

You’ll also find a complete STM32 Programming Series of Tutorials if you’re interested to dive deeper and master this tool to build your own embedded systems applications.

STM32 GPIO Write Pin, Toggle Pin (LED Blinking Example)

This is a step-by-step guide for programming an STM32 blue pill board using the STM32CubeMX & STM32CubeIDE toolchain to create your first LED blinking project with the STM32 microcontroller.

STM32 Blue Pill Arduino Programming

The STM32 Blue Pill board can also be programmed with Arduino IDE using the Arduino C++ programming language to enjoy the wide variety of community-contributed library support of the Arduino platform.

In the tutorial linked below, you’ll learn how to install the Arduino IDE & software tools required for STM32 Blue Pill programming in Arduino IDE. And how to flash the Arduino Bootloader to the STM32F103 MCU to use the USB port for programming it via Arduino IDE just like any Arduino Board you’ve worked with before.

STM32 Arduino IDE Programming Guide (STM32DUINO)

This is a step-by-step guide for flashing the Arduino bootloader to the STM32F103 blue pill board. And programming it using the Arduino IDE & Arduino C++ programming language.

Simulating STM32 Blue Pill Board (in Proteus)

Simulating your STM32 projects can be really helpful especially when you’re just getting started with STM32 microcontrollers. This step is not mandatory at all, however, running your project in a simulator environment will help you catch and fix some logic errors in the code or in the circuit wiring connections.

If the code doesn’t run logically in simulation, it won’t either do in the real world. However, the opposite is not always true. If your project runs in simulation perfectly, it doesn’t mean it’ll also do in the real world. Many external factors can affect the application running on a real STM32 board. Things like noise, bad wiring, damaged parts, and more other obstacles that can’t be predicted by your simulator.

But all in all, it’s a great tool for learning and getting started with STM32 even if you don’t have an STM32 board or the full hardware kit yet. Follow the tutorial linked below to learn how to install the STM32 blue pill proteus library and simulate your projects in the Proteus ISIS simulation environment.

STM32 Proteus Simulation Guide

This article will give more in-depth information about simulating STM32 projects using the Proteus ISIS simulator.

Wrap Up

To conclude this guide, I’d like to recommend getting the STM32F103C8T6-based blue pill board as you’re going to need that extra memory space for developing advanced applications or when you flash the Arduino USB bootloader to the board.

If you’re just getting started with STM32, you need to check out theSTM32 Getting Started Tutorialhere.

Follow thisSTM32 Series of Tutorialsto learn more about STM32 Microcontrollers Programming.

Related

STM32 Blue Pill Pinout & Programming Guide – DeepBlue (2024)

References

Top Articles
Latest Posts
Article information

Author: Pres. Carey Rath

Last Updated:

Views: 6107

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.