Skip to content
Home > Components > Logic Components > STM32 Blue Pill

STM32 Blue Pill

A powerful 32-bit ARM Cortex-M3 microcontroller development board running at 72 MHz.

Component Preview

STM32 Blue PillSTM32 Board

The STM32 "Blue Pill" is a development board for the STM32F103C8T6 microcontroller. It offers significantly more processing power (72 MHz), memory (20KB SRAM, 64KB Flash), and peripherals than standard 8-bit Arduino boards while remaining highly affordable.

Logic ComponentsMicrocontrollerARM Cortex-M3

Overview

The Blue Pill can be programmed using the official STM32Cube ecosystem, or via the Arduino IDE using the STM32duino core. It features advanced timers, 12-bit ADCs, CAN bus, and multiple UART/I2C/SPI interfaces.

Pin Reference (Condensed)

Because the Blue Pill has over 30 pins, this table highlights the most commonly used power and programming pins.

PinTypeDescription
3V3power3.3V Power Supply.
GNDpowerGround.
5Vpower5V input (passes through onboard regulator).
PC13digitalBuilt-in LED (Active Low).
SWDIOdigitalSWD Data (for programming/debugging).
SWCLKdigitalSWD Clock (for programming/debugging).
PA0-PA7analogGeneral Purpose I/O and 12-bit Analog Inputs.

Configurable Attributes

This component has no configurable attributes.

Wiring Diagram

Wiring Diagram

Example Arduino Code (STM32duino)

This standard blink sketch toggles the built-in LED on pin PC13. Note that on the Blue Pill, the LED is usually wired actively low (turns on when pin is LOW).

cpp
// Built-in LED on the Blue Pill is connected to PC13
const int ledPin = PC13; 

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

void loop() {
  digitalWrite(ledPin, LOW);  // Turn LED ON (Active Low)
  delay(1000);                
  digitalWrite(ledPin, HIGH); // Turn LED OFF
  delay(1000);                
}

Simulation Notes

  • The OpenHW Simulator provides an emulation layer for the ARM Cortex-M3 core and core peripherals (GPIO, basic timers). Advanced hardware peripherals (like CAN or complex DMA chains) might not be fully simulated depending on the current engine version.

Released under the MIT License.