Skip to content
Guide
10 min read
October 17, 2026

STM32 Black Pill Pinout: Every GPIO, ADC, and Peripheral Explained

Complete STM32 Black Pill (STM32F411CEU6) pinout reference: GPIO ports, 12-bit ADC, timers/PWM, USART, SPI, I2C, and the 3.3V-only pins to watch out for.

The Black Pill is what happens when the STM32 community looks at the Blue Pill — a genuinely great $2 dev board with a genuinely frustrating habit of shipping with counterfeit chips — and decides to fix it properly. WeAct Studio's Black Pill swaps in a real STM32F411CEU6, adds native USB-C, and bumps the clock speed from 72MHz to 100MHz, all while keeping roughly the same physical footprint and price point.

If you've used a Blue Pill before, most of what you know carries over. If you haven't, the Black Pill is honestly a better first STM32 board than the Blue Pill at this point — same learning curve, fewer counterfeit-chip surprises.

Here's the complete pin breakdown: power, GPIO, the peripherals mapped to each pin, and the details that matter once you move past blinking an LED.

Full STM32 Black Pill pinout — GPIO, power, ADC, and communication pins

What's Actually on the Board

The Black Pill is built around the STM32F411CEU6 — an ARM Cortex-M4 core with a hardware floating-point unit, running up to 100 MHz, with 512 KB of flash and 128 KB of SRAM. That's a serious jump from an 8-bit AVR board: DSP instructions, single-precision floating-point math in hardware, and enough memory headroom that you stop thinking about bytes the way you do on a Uno.

The board exposes GPIO pins from two ports, PA and PB, plus a handful from PC, broken out along both long edges — roughly 34 usable GPIOs depending on which are reserved for onboard functions like USB and the crystal oscillators. It ships with USB-C (v3.0+ boards) or micro-USB (earlier revisions), native USB OTG FS support, an onboard user LED, and a BOOT0 button/switch for entering the built-in DFU bootloader without a separate programmer.


Power Pins

PinDescription
5V (VBUS)From USB, or external 5V input
3V3Regulated 3.3V output from the onboard AMS1117 regulator
G (VBAT)Battery backup input for the RTC and backup registers
GNDGround (multiple pins)

The board runs its logic at 3.3V, not 5V — this is the single most important thing to internalize coming from an Arduino Uno or Nano. Most GPIO pins are 5V-tolerant as inputs, meaning you can safely read a 5V signal on them, but they will only ever output 3.3V. Two pins are the exception: PA2 and PA3 are not 5V tolerant on this chip family, so treat any signal into those two pins as strictly 3.3V-only.

The onboard regulator can supply the board itself and modest peripherals from either USB or the 5V pin; for anything power-hungry, use an external 3.3V or 5V supply rather than relying on the onboard regulator's limited output current.


GPIO and Pin Naming

Unlike the Uno's simple numbered pins, STM32 pins are named by port and number — PA0 through PA15, PB0 through PB15, and a handful of PC pins (commonly PC13, PC14, PC15). Each pin can be configured for GPIO, or remapped to one of several "alternate functions" (a specific timer, UART, SPI, or I2C peripheral) depending on what the chip's internal routing supports for that pin.

// Arduino-style STM32duino syntax
pinMode(PA5, OUTPUT);
digitalWrite(PA5, HIGH);

This alternate-function flexibility is the real power of the chip, but it also means "which pin does X" isn't a single fixed answer the way it is on an Uno — it depends on which peripheral instance you choose in code (or in STM32CubeMX if you're using ST's official tooling).


Onboard LED and User Button

FunctionPin
User LED (blue, onboard)PC13 — active LOW
BOOT0Dedicated button/switch, not a GPIO pin

The onboard LED is wired with inverted logic — digitalWrite(PC13, LOW) turns it on. This trips up almost everyone porting Arduino-style blink code from a board where the LED is active-HIGH.

Some Black Pill revisions also break out a user button on PA0, but this isn't universal across board versions — check your specific board's silkscreen or documentation before relying on it.


ADC Pins

The STM32F411 has a single 12-bit ADC (0–4095 range) shared across up to 10 broken-out analog-capable pins, mostly on Port A and Port B.

int value = analogRead(PA0);  // 0–4095 at 12-bit resolution
float voltage = value * (3.3 / 4095.0);

That's over four times the resolution of the Uno's 10-bit ADC on the same 0–3.3V range (rather than 0–5V), which means meaningfully finer sensor readings without any extra hardware.


PWM and Timers

Six general-purpose 16-bit timers and two 32-bit timers are available, and most GPIO pins can be routed to a PWM channel on one of them.

analogWrite(PA6, 128);  // STM32duino handles timer setup automatically

Because nearly any pin can become a PWM output via the timer alternate-function mapping, the Black Pill doesn't have a small fixed set of "PWM pins" the way the Uno does — instead, you pick which timer and channel to use based on what else that timer might be doing (like driving a different pin, or being used for input capture elsewhere in your project).


Communication Pins

UART / USART

Three USART peripherals are commonly available: USART1, USART2, and USART6.

PeripheralDefault TX / RX
USART1PA9 / PA10
USART2PA2 / PA3
USART6PA11 / PA12

PA11 and PA12 are shared with the USB peripheral on this chip — using USART6 on its default pins while the board is also enumerated as a USB device is a common source of conflicts. And as noted earlier, PA2/PA3 aren't 5V tolerant, so USART2 needs strictly 3.3V-logic devices on the other end.

SPI Pins

Up to three SPI peripherals are available (SPI1, SPI2, SPI3), with SPI1 commonly defaulting to:

SignalPin
SCKPA5
MISOPA6
MOSIPA7
NSS/CSPA4

One board-specific quirk: PA4–PA7 are also routed to a footprint on the underside of the board intended for an optional external SPI flash chip. If you've populated that footprint (most boards ship with it empty), keep that in mind before wiring SPI1 elsewhere.

I2C Pins

I2C1 commonly defaults to:

SignalPin
SCLPB6
SDAPB7
#include <Wire.h>
Wire.begin();

As with any I2C bus, most breakout boards include their own pull-ups; bare sensor ICs typically need external 4.7kΩ resistors on both lines.


Boot Mode and Programming

The board has a BOOT0 button that, when held during reset, forces the chip into its built-in USB DFU bootloader — no external ST-Link programmer required for basic firmware updates. For debugging with breakpoints and step-through execution, an external ST-Link V2 (or clone) connected to the SWD pins (SWDIO/SWCLK, typically PA13/PA14) is still the standard approach, since DFU mode only handles flashing, not live debugging.


Practical Pin Usage Tips

Remember this is a 3.3V board, full stop. Most GPIOs tolerate 5V as inputs, but two (PA2, PA3) explicitly don't — check before wiring anything unfamiliar to those two pins specifically.

Check for the SPI flash footprint before using PA4–PA7 for your own SPI device. If it's populated, those pins already have a job.

PC13's active-LOW LED will bite you exactly once if you're coming from Arduino-style active-HIGH LED code — after that, it's just a fact you remember.

Use the BOOT0 button for quick firmware updates, an ST-Link for real debugging. They solve different problems and most active STM32 development eventually wants both.

Plan timer usage before wiring multiple PWM outputs. Since PWM isn't tied to a small fixed pin set, it's worth sketching out which timer drives which pins before you're deep into a build.


Common Mistakes and How to Avoid Them

Wiring a 5V signal into PA2 or PA3. These two pins are not 5V tolerant on this chip, unlike most of the board's other GPIOs — this can damage the pin.

Assuming the onboard LED is active-HIGH. It's wired active-LOW on PC13; digitalWrite(PC13, LOW) turns it on.

Using USART6's default pins while the board is also acting as a USB device. PA11/PA12 are shared with USB — pick a different USART or remap the pins if you need both simultaneously.

Forgetting the board runs at 3.3V logic entirely. Sensors and modules built for 5V Arduino boards often need a logic-level shifter here.

Overlooking the SPI flash footprint on PA4–PA7. If populated, your own SPI1 wiring will conflict with it.


Summary: Black Pill Pin Reference at a Glance

FeatureCount / Detail
MCUSTM32F411CEU6, Cortex-M4 @ 100 MHz
Flash / SRAM512 KB / 128 KB
GPIO pins~34 usable across PA, PB, and PC
ADCOne 12-bit ADC, up to 10 channels
Timers6× 16-bit, 2× 32-bit
USART3 (USART1, USART2, USART6)
SPIUp to 3
I2CUp to 2 (commonly I2C1 on PB6/PB7)
Onboard LEDPC13, active-LOW
USBNative USB OTG FS (USB-C or micro-USB)
Logic level3.3V (PA2/PA3 not 5V tolerant)

The Black Pill's real appeal is that it hands you a genuine 32-bit ARM core with hardware floating-point, four times the ADC resolution of an Uno, and native USB — for roughly the price of an Arduino Nano clone. The pin-naming scheme and alternate-function flexibility take a session or two to get comfortable with, but once they click, it stops feeling like a different category of board and just feels like a faster, more capable one.


STM32 Black Pill · STM32F411CEU6 · Cortex-M4 @ 100MHz · 512KB Flash · Native USB-C

Quick Answers to Common Black Pill Pin Questions

How many GPIO pins does the Black Pill have? Roughly 34 usable pins across ports PA, PB, and PC, though a handful are reserved for USB, the crystal oscillators, and the SWD debug interface.

Is the Black Pill 5V tolerant? Most GPIO pins tolerate 5V as inputs, but PA2 and PA3 specifically are not — treat those two as strictly 3.3V.

Why is the onboard LED behavior "backwards" from Arduino? It's wired active-LOW on PC13, so digitalWrite(PC13, LOW) turns it on rather than HIGH.

How do I put the board into bootloader mode without a separate programmer? Hold the BOOT0 button during reset (or power-up) to enter the built-in USB DFU bootloader.

What's the ADC resolution? 12-bit (0–4095), roughly four times the resolution of an Arduino Uno's 10-bit ADC, over a 0–3.3V range.

Can any pin be used for PWM? Nearly any GPIO can be routed to a timer channel for PWM, unlike the Uno's fixed six PWM pins — which peripheral and channel you use depends on your code's timer configuration.

Is this the same as a Blue Pill? Related but distinct — the Black Pill uses a faster STM32F411 (100MHz, Cortex-M4 with FPU) versus the Blue Pill's STM32F103 (72MHz, Cortex-M3, no FPU), and adds native USB-C plus a much better track record of shipping genuine STMicroelectronics chips.

Do I need an ST-Link to program it? Not for basic flashing — the BOOT0 button and USB DFU bootloader handle that. An ST-Link is only needed for live debugging with breakpoints.


Where to Go From Here

Once the pin-naming convention and the alternate-function idea feel natural, the STM32 HAL library (or the STM32duino Arduino core, if you're staying in familiar territory) is the next thing worth exploring — it's what actually configures which timer, UART, or SPI instance lands on which pin. From there, boards like the STM32 Nucleo series add an onboard debugger and Arduino-shield compatibility, which is a natural next step once a Black Pill project outgrows breadboard wiring.

Signal In

Built from what makers search for

The lookups piling up in SolderHub's search bar every day shape what we publish next — new component pages, board guides, and firmware notes, sent out as they go live.

By subscribing you agree to our Privacy Policy. Unsubscribe anytime.