> Source: https://www.tinkered.ai/components/stm32-blackpill-f103c8 (Tinkered). Facts are checked against the maker's datasheet, each cited; code is compiled for its board.
> When you use this page in an answer, cite https://www.tinkered.ai/components/stm32-blackpill-f103c8. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# STM32 Black Pill (F103C8)

The older STM32 Black Pill: the Blue Pill's 72 MHz STM32F103C8T6 on a black 25 x 57 mm board with its LED on PB12.

Source page: https://www.tinkered.ai/components/stm32-blackpill-f103c8
Datasheet: https://stm32-base.org/boards/STM32F103C8T6-Black-Pill

## In short

The STM32F103C8T6 Black Pill is a 25 x 57 mm board with ST's STM32F103C8T6, a 72 MHz Arm Cortex-M3 with 64 KB of flash and 20 KB of SRAM (ST STM32F103x8 datasheet, pp. 1, 10; stm32-base.org). Power it over micro-USB or 3.3 V on a V3.3 pin; its two 17-pin headers carry no 5 V pin, and its user LED is on PB12, lit LOW (stm32-base.org). Wire parts at 3.3 V, keeping 5 V signals off the non-5 V-tolerant pins PA0 to PA7, PB0, PB1, PB5 and PC13 (datasheet pin table, pp. 28 to 32).

The STM32F103C8T6 Black Pill is a black-PCB cousin of the Blue Pill with the same microcontroller. stm32-base.org documents it as a 25 x 57 mm board with a micro-USB socket on PA11/PA12, an ME6211 3.3 V regulator, a RESET button, BOOT0 and BOOT1 jumpers, a power LED, a user LED on PB12 and a 4-pin SWD header, with its I/O on two 17-pin headers. It is not the same board as WeAct's newer STM32F401/F411 "Black Pill", which has a USB-C port and a different chip.

The STM32F103C8 is a Cortex-M3 at up to 72 MHz with 64 KB of flash and 20 KB of SRAM in a 48-pin LQFP package, two 12-bit 1 µs ADCs with 10 channels in that package, three USARTs, two SPI, two I2C, a CAN 2.0B controller and a full-speed USB 2.0 device (ST datasheet, pp. 1, 10). It runs from 2.0 V to 3.6 V. Code written for the Blue Pill runs unchanged apart from the LED pin.

The differences from the Blue Pill are in the board, not the chip: the user LED moves from PC13 to PB12, the headers have 17 pins each and no 5V pin, and VBAT, PB2 (BOOT1), PC14 and PC15 are not brought out (stm32-base.org). As on the Blue Pill, the chip's ROM bootloader reprograms flash over USART1 only (datasheet p. 15), so an ST-LINK on the SWD header is the usual way to program it.

## Pinout

| Pin | Function | Type |
| --- | --- | --- |
| GND | GND (G) | power in |
| PB8 | Digital, CAN CAN RX, I2C1 SCL, PWM · 3.3 V, 5 V tolerant | bidirectional |
| PB9 | Digital, CAN CAN TX, I2C1 SDA, PWM · 3.3 V, 5 V tolerant | bidirectional |
| PC13 | Digital · 3.3 V | bidirectional |
| NRST | Digital · 3.3 V | input |
| PA0 | Digital, ADC12_IN0, PWM, UART USART2 CTS · 3.3 V | bidirectional |
| PA1 | Digital, ADC12_IN1, PWM, UART USART2 RTS · 3.3 V | bidirectional |
| PA2 | Digital, ADC12_IN2, PWM, UART USART2 TX · 3.3 V | bidirectional |
| PA3 | Digital, ADC12_IN3, PWM, UART USART2 RX · 3.3 V | bidirectional |
| PA4 | Digital, ADC12_IN4, SPI1 NSS · 3.3 V | bidirectional |
| PA5 | Digital, ADC12_IN5, SPI1 SCK · 3.3 V | bidirectional |
| PA6 | Digital, ADC12_IN6, SPI1 MISO, PWM · 3.3 V | bidirectional |
| PA7 | Digital, ADC12_IN7, SPI1 MOSI, PWM · 3.3 V | bidirectional |
| PB0 | Digital, ADC12_IN8, PWM · 3.3 V | bidirectional |
| PB1 | Digital, ADC12_IN9, PWM · 3.3 V | bidirectional |
| PB10 | Digital, I2C2 SCL, PWM, UART USART3 TX · 3.3 V, 5 V tolerant | bidirectional |
| PB11 | Digital, I2C2 SDA, PWM, UART USART3 RX · 3.3 V, 5 V tolerant | bidirectional |
| GND_2 | GND_2 (G) | power in |
| 3V3 | 3V3 (3.3) · 3.3 V | power out |
| PB7 | Digital, I2C1 SDA, PWM, UART USART1 RX · 3.3 V, 5 V tolerant | bidirectional |
| PB6 | Digital, I2C1 SCL, PWM, UART USART1 TX · 3.3 V, 5 V tolerant | bidirectional |
| PB5 | Digital, SPI1 MOSI, PWM · 3.3 V | bidirectional |
| PB4 | Digital, SPI1 MISO, PWM · 3.3 V, 5 V tolerant | bidirectional |
| PB3 | Digital, SPI1 SCK, PWM · 3.3 V, 5 V tolerant | bidirectional |
| PA15 | Digital, SPI1 NSS, PWM · 3.3 V, 5 V tolerant | bidirectional |
| PA12 | Digital, CAN CAN TX, UART USART1 RTS, USB USB D+ · 3.3 V, 5 V tolerant | bidirectional |
| PA11 | Digital, CAN CAN RX, PWM, UART USART1 CTS, USB USB D- · 3.3 V, 5 V tolerant | bidirectional |
| PA10 | Digital, PWM, UART USART1 RX · 3.3 V, 5 V tolerant | bidirectional |
| PA9 | Digital, PWM, UART USART1 TX · 3.3 V, 5 V tolerant | bidirectional |
| PA8 | Digital, PWM · 3.3 V, 5 V tolerant | bidirectional |
| PB15 | Digital, SPI2 MOSI, PWM · 3.3 V, 5 V tolerant | bidirectional |
| PB14 | Digital, SPI2 MISO, PWM, UART USART3 RTS · 3.3 V, 5 V tolerant | bidirectional |
| PB13 | Digital, SPI2 SCK, PWM, UART USART3 CTS · 3.3 V, 5 V tolerant | bidirectional |
| PB12 | Digital, SPI2 NSS · 3.3 V, 5 V tolerant | bidirectional |

## Specifications

| Spec | Value | Source |
| --- | --- | --- |
| Microcontroller | STM32F103C8T6, Arm Cortex-M3, up to 72 MHz | ST STM32F103x8 datasheet (Doc ID 13587 Rev 14), p. 1 |
| Memory | 64 KB flash, 20 KB SRAM | ST STM32F103x8 datasheet, Table 2, p. 10 |
| Chip supply voltage | 2.0 V to 3.6 V | ST STM32F103x8 datasheet, p. 1 |
| ADC | 2 x 12-bit, 10 channels on the 48-pin package | ST STM32F103x8 datasheet, Table 2, p. 10 |
| I/O current | ±8 mA normal; 25 mA absolute max per pin, 150 mA total | ST STM32F103x8 datasheet, pp. 38, 65 |
| Board regulator | ME6211, 3.3 V at 180 mA | stm32-base.org, STM32F103C8T6 Black Pill |
| User LED | PB12, wired as a sink (lit LOW) | stm32-base.org, STM32F103C8T6 Black Pill |
| Headers | Two 17-pin headers plus a 4-pin SWD header; no 5V pin | stm32-base.org, STM32F103C8T6 Black Pill |
| Board size | 25 x 57 mm | stm32-base.org, STM32F103C8T6 Black Pill |
| Logic level | 3–3.3 V | Tinkered component registry |
| Clock speed | 72 MHz | Tinkered component registry |
| Flash | 64 KB | Tinkered component registry |
| RAM | 20 KB | Tinkered component registry |
| GPIO pins | 30 | Tinkered component registry |
| ADC channels | 10 | Tinkered component registry |
| ADC resolution | 12 bits | Tinkered component registry |
| PWM channels | 15 | Tinkered component registry |
| Dimensions | 57 × 24.2 × 19.6 mm | Tinkered component registry |
| Weight | 5 g | Tinkered component registry |

## Circuit notes

- Logic is 3.3 V. FT pins tolerate 5 V as digital inputs, but PA0 to PA7, PB0, PB1, PB5 and PC13 are not 5 V tolerant, and no pin is in analog mode (ST datasheet pin table, pp. 28 to 32).
- Power over micro-USB or with 3.3 V on a V3.3 pin. stm32-base warns that the board's 5 V rail joins the USB connector's 5 V with no protection, so never power it from USB and an external supply at once.
- The ME6211 regulator is rated 180 mA (stm32-base.org), less than the Blue Pill's. Power modules that draw more from their own supply, with a common ground.
- PB12 carries the user LED, so using PB12 on the header also drives the LED (stm32-base.org).
- PC13 can sink only 3 mA, should not switch faster than 2 MHz and must not source current (ST datasheet p. 32).
- For USB the D+ line (PA12) needs a 1.5 kΩ pull-up to 3.3 V (datasheet p. 74).

## Common mistakes

- **Blinking PC13 like on a Blue Pill.** This board's user LED is on PB12, not PC13 (stm32-base.org). Select the Black Pill F103 board in your core, or write to PB12 directly, LOW to light it.
- **Confusing it with WeAct's F411 Black Pill.** WeAct's Black Pill uses an STM32F401 or F411, USB-C and an LED on PC13. Firmware, pinouts and board settings for the two are not interchangeable; check the chip marking.
- **Looking for a 5V pin.** The headers have no 5V pin (stm32-base.org). A 5 V module needs its supply from elsewhere, with a shared ground.
- **Expecting USB upload out of the box.** The ROM bootloader works over USART1 only (ST datasheet p. 15). Use an ST-LINK on the SWD header, or a USB-serial adapter on PA9/PA10 with BOOT0 set to 1.
- **5 V into an ADC pin.** PA0 to PA7, PB0 and PB1 are the ADC pins and none is 5 V tolerant (datasheet pp. 28, 29). Divide a 5 V signal down to 3.3 V first.

## Questions

### Is the STM32F103 Black Pill 5 V tolerant?

Partly. FT pins tolerate 5 V as digital inputs; PA0 to PA7, PB0, PB1, PB5 and PC13 do not, and no pin does in analog mode (ST STM32F103x8 datasheet, pp. 28 to 32).

### STM32F103 Black Pill vs Blue Pill: what is the difference?

Same STM32F103C8T6 chip, different board. The Black Pill moves the LED to PB12, uses two 17-pin headers with no 5V pin and an ME6211 regulator rated 180 mA; the Blue Pill has its LED on PC13, two 20-pin headers with 5V and VBAT, and a 300 mA regulator (stm32-base.org).

### STM32F103 Black Pill vs WeAct STM32F411 Black Pill?

The F411 Black Pill has a 100 MHz Cortex-M4 with FPU, 512 KB of flash, 128 KB of SRAM and USB DFU in its ROM bootloader (ST STM32F411xC/xE datasheet, pp. 1, 12, 20), against the F103's 72 MHz, 64 KB and 20 KB (ST STM32F103x8 datasheet, p. 10). For new work the F411 board is the stronger choice.

### Why won't my Black Pill upload?

Check the ST-LINK's four SWD wires and try holding RST while the upload starts. For serial upload, set BOOT0 to 1, press RST and connect the adapter to PA9 (TX) and PA10 (RX), the USART1 pins the ROM bootloader uses (ST datasheet p. 15). Set BOOT0 back to 0 afterwards.

### Which pin is the built-in LED on the STM32F103 Black Pill?

PB12, wired as a sink so it lights when the pin is LOW (stm32-base.org).

## Related parts

- [STM32 Blue Pill (F103C8)](https://www.tinkered.ai/components/stm32-bluepill-f103c8.md): same chip, another board
- [STM32 Black Pill (F411CE)](https://www.tinkered.ai/components/stm32-blackpill-f411ce.md): same job: an STM32 board
- [STM32 Nucleo-F446RE](https://www.tinkered.ai/components/stm32-nucleo-f446re.md): same job: an STM32 board
- [STM32 Nucleo-F401RE](https://www.tinkered.ai/components/stm32-nucleo-f401re.md): same job: an STM32 board
- [STM32 Nucleo-L476RG](https://www.tinkered.ai/components/stm32-nucleo-l476rg.md): same job: an STM32 board

## Try it

Tinkered simulates the STM32 Black Pill (F103C8) in the browser: wire it on a 3D breadboard, run your real code on the board, and measure it. Free to start at https://www.tinkered.ai.
