

The STM32F103C8T6, commonly referred to as the "Blue Pill," is a 32-bit microcontroller developed by STMicroelectronics. It is based on the ARM Cortex-M3 core and is designed for high-performance, low-power embedded applications. With 64KB of flash memory, 20KB of SRAM, and a wide range of peripherals, the Blue Pill is a versatile and cost-effective solution for hobbyists and professionals alike.








| Parameter | Value |
|---|---|
| Core | ARM Cortex-M3 |
| Operating Frequency | 72 MHz |
| Flash Memory | 64 KB |
| SRAM | 20 KB |
| Operating Voltage | 2.0V to 3.6V |
| GPIO Pins | 37 |
| Communication Interfaces | UART, SPI, I2C, CAN, USB |
| ADC Resolution | 12-bit (up to 16 channels) |
| Timers | 3 general-purpose, 1 advanced |
| Power Consumption | ~36 mA at 72 MHz (typical) |
| Package | LQFP48 |
The STM32F103C8T6 features 48 pins, with 37 GPIO pins that can be configured for various functions. Below is a summary of key pins:
| Pin Name | Pin Number | Function(s) | Description |
|---|---|---|---|
| VDD | 2, 31 | Power Supply | 3.3V power input |
| VSS | 8, 23 | Ground | Ground connection |
| PA0-PA15 | Multiple | GPIO, ADC, Timer, etc. | General-purpose I/O pins |
| PB0-PB15 | Multiple | GPIO, ADC, Timer, etc. | General-purpose I/O pins |
| PC13-PC15 | Multiple | GPIO | General-purpose I/O pins |
| NRST | 7 | Reset | Active-low reset pin |
| BOOT0 | 44 | Boot Mode Selection | Selects boot mode (Flash/Bootloader) |
| USB_DM | 11 | USB Data- | USB data line (negative) |
| USB_DP | 12 | USB Data+ | USB data line (positive) |
For a complete pinout, refer to the STM32F103C8T6 datasheet.
The STM32F103C8T6 can be programmed using the Arduino IDE with the STM32duino core installed. Below is an example of blinking an LED connected to pin PC13:
// Blink an LED on PC13 (built-in LED on Blue Pill)
void setup() {
pinMode(PC13, OUTPUT); // Set PC13 as an output pin
}
void loop() {
digitalWrite(PC13, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(PC13, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
Note: Ensure the correct board and upload method are selected in the Arduino IDE.
Microcontroller Not Responding
USB Not Recognized
Code Upload Fails
GPIO Pins Not Working
Q: Can I power the Blue Pill with 5V?
Q: How do I reset the microcontroller?
Q: Can I use the Blue Pill with an external programmer?
Q: Is the Blue Pill compatible with Arduino libraries?
By following this documentation, you can effectively utilize the STM32F103C8T6 microcontroller in your projects.