STM32 Blue Pill Pinout & Programming Guide

In this article, you’ll find the STM32 Blue Pill Pinout Diagram for 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).


Blue Pill Pinout Diagram (STM32F103)

Blue pill pinout
STM32 Blue Pill Pinout Diagram (STM32F103C8T6 / STM32F103C6T6)

❕ 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

FLASH (ROM)64kB/128kB16kB/32kB
* This table mentions the differences only between the target MCUs, anything else that’s not mentioned is almost identical in both target MCUs.

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 Example HAL Write_Pin & Toggle Pin (Digital Output)

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 With Arduino IDE (Blue Pill stm32f103c8t6 Arduino) Tutorial

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 Library (BluePill Stm32f103c6)

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 the STM32 Getting Started Tutorial here.

Follow this STM32 Series of Tutorials to learn more about STM32 Microcontrollers Programming.

Share This Page With Your Network!
Join Our +25,000 Newsletter Subscribers!

Stay Updated With All New Content Releases. You Also Get Occasional FREE Coupon Codes For Courses & Other Stuff!

Photo of author
Khaled Magdy
Embedded systems engineer with several years of experience in embedded software and hardware design. I work as an embedded SW engineer in the Automotive & e-Mobility industry. However, I still do Hardware design and SW development for DSP, Control Systems, Robotics, AI/ML, and other fields I'm passionate about.
I love reading, writing, creating projects, and teaching. A reader by day and a writer by night, it's my lifestyle. I believe that the combination of brilliant minds, bold ideas, and a complete disregard for what is possible, can and will change the world! I will be there when it happens, will you?

Leave a Comment