Blue Pill

From Deskthority Wiki
Jump to navigationJump to search

This article is a stub. You can help Deskthority by expanding it.

Blue Pill
Manufacturer Various
Host port USB Micro B (varying quality)
Microcontroller STM32F103
MPU ARM Cortex-M3
Voltage 3.3 V
Clock speed 72 MHz
Digital I/O pins 32
I/O Voltage 3.3 V
RAM 20 KB
Program memory 64 KB
Boot loader None

Blue Pill and Red Pill are nicknames for a common microcontroller board with STM32F103 microcontrollers, having blue and red soldermask, respectively.

The red boards were probably the original, made by an unknown manufacturer. They has only the marking "JC66 STM32F103C8 CoreBoard".

Clones with blue soldermask have been made by multiple manufacturers, and have been popular because they have been common and very cheap.

Description[edit | edit source]

The microcontroller is a STM32F103, running at 72 MHz, with 64 KB Flash and 20 KB RAM.

The board's format is similar to that of a 40-pin DIP package but the board is typically somewhat wider to have space for printing pin numbers.

Has a 32 khz real-time clock crystal.

It has a reset button. There is a four-pin SWD header on the short edge.

There are two header pin triplets with jumpers, for enabling programming over SWD.

Shortcomings[edit | edit source]

Some variants have addressed these shortcomings: see variants below.

  • The pull-up resistor (R10) on the USB D+ is often of the wrong value: either 10 kΩ or 4.7 kΩ. To comply with the USB standard and work with more hardware, it should be replaced with a resistor of 1.5 kΩ or get an additional resistor in parallel.
  • It does not come with a USB bootloader, so SWD must be used to program the device with firmware or a bootloader.
  • The Micro USB port is often just surface-mounted, and therefore easily broken.
  • The voltage regulator is capable of supplying no more than 100 mA to external devices. It otherwise overheats easily.
  • There is no diode from VBUS to the board's +5V pin, so you can't have it connected via USB and get +5V from an external source at the same time.
  • There is no reference-power for the analog-to-digital converters.
  • There are components on both sides of the board.

Pinout[edit | edit source]

Function Pin Pin Function
CK3,NSS2 PB12 USB GND or VBUS
CTS3,SCK2 PB13   GND
RTS3,MISO2 PB14 +3.3V
MOSI2 PB15 NRST (Reset)
CK1 PA8 PB11 SDA2,RX3
TX1 PA9 PB10 SCL2,TX3
RX1 PA10 PB1 ADC9
CTS1 PA11 PB0 ADC8
RTS1 PA12 PA7 ADC7,MOSI1
NSS1 PA15 PA6 ADC6,MISO1
SCK1 PB3 PA5 ADC5,SCK1
MISO1 PB4 PA4 ADC4,NSS1,CK2
MOSI1 PB5 PA3 ADC3,RX2
TX1,SCL1 PB6 PA2 ADC2,TX2
RX1,SDA1 PB7 PA1 ADC1,RTS2
SCL1 PB8 PA0 ADC0,CTS2
SDA1 PB9 PC15
+5V (VBUS) PC14
GND PC13
+3.3V VBAT

Notes:

  • One pin is GND or VBUS depending on board model.
  • The +5V line is connected directly to VBUS
  • User LED is on PC13, lit when PC13 is low.
  • The four-pin SWD port on the short edge is not shown in this diagram.

Variants[edit | edit source]

RobotDyn STM32 Mini[edit | edit source]

It is often called the RobotDyn Black Pill because of its black solder mask, and must not be confused with other black STM32 boards also called "Black Pill" such as the one from WeAct Studio.

  • It has a diode from VBUS and a more capable power regulator.
  • The Micro USB port is through-hole soldered and the pull-up resistor has the correct value.
  • The board is also narrower.

External links:

WeAct Studio BluePill Plus[edit | edit source]

Multiple variants:

µC Clock SRAM Flash
STM32F103C8T6 72 MHz 20 KB 64 KB
GD32F303CCT6 120 MHz 48 KB 256 KB

They are licensed under GPL version 3.

  • Has a USB C port.
  • The jumpers have been removed, instead having a BOOT0 button that must be held for 0.5s during reset.
  • The user LED is on PB2, active high.
  • A user button on PA0.
  • Diode from VBUS to VCC, allowing external power while plugged in via USB. The +5V pin is connected to VCC.
  • The GND pin nearest the USB port's short edge has been changed into an additional VCC.
  • The bottom is flat, with pads for an optional W25Q32JVSSIQ SPI flash chip.
  • Realtime clock has been removed.

External links:

External links[edit | edit source]

Trivia[edit | edit source]

The nicknames "Blue Pill" and "Red Pill" are a reference to the movie The Matrix (1999). They were coined on the STM32duino forum.