

The STM32 Blue Pill is a low-cost development board manufactured by Bluepill, featuring the STM32F103C8T6 microcontroller. It is based on the ARM Cortex-M3 architecture and is widely used for prototyping and embedded systems projects. Its compact size, affordability, and versatility make it a popular choice among hobbyists and professionals alike.








The STM32 Blue Pill is equipped with the STM32F103C8T6 microcontroller, offering the following key specifications:
| Parameter | Value |
|---|---|
| Microcontroller | STM32F103C8T6 |
| Core | ARM Cortex-M3 |
| Operating Frequency | 72 MHz |
| Flash Memory | 64 KB |
| SRAM | 20 KB |
| GPIO Pins | 37 |
| Communication Interfaces | USART, SPI, I2C, CAN, USB |
| ADC Channels | 10 (12-bit resolution) |
| PWM Channels | 15 |
| Operating Voltage | 3.3V |
| Input Voltage Range | 5V (via USB) or 7-12V (via VIN) |
| Dimensions | 53 mm x 22 mm |
The STM32 Blue Pill has a total of 32 GPIO pins, which can be configured for various functions. Below is the pinout description:
| Pin | Function | Description |
|---|---|---|
| PA0-PA15 | GPIO, ADC, PWM, USART, SPI | General-purpose I/O pins with alternate functions |
| PB0-PB15 | GPIO, ADC, PWM, USART, SPI | General-purpose I/O pins with alternate functions |
| PC13-PC15 | GPIO | General-purpose I/O pins |
| 3.3V | Power | 3.3V output for powering external components |
| 5V | Power | 5V input/output |
| GND | Ground | Ground connection |
| NRST | Reset | Reset pin for the microcontroller |
| BOOT0 | Boot Mode Selection | Used to select boot mode (Flash, RAM, or System Memory) |
| USB D+ | USB Data+ | USB communication |
| USB D- | USB Data- | USB communication |
Powering the Board:
Programming the Board:
Boot Mode Selection:
0 (GND) for normal operation (boot from Flash memory). 1 (VCC) to boot into the system memory for programming.Connecting Peripherals:
Below is an example of blinking an LED connected to pin PC13 using the Arduino IDE:
// Define the LED pin
#define LED_PIN PC13
void setup() {
pinMode(LED_PIN, OUTPUT); // Set PC13 as an output pin
}
void loop() {
digitalWrite(LED_PIN, HIGH); // Turn the LED on
delay(500); // Wait for 500 milliseconds
digitalWrite(LED_PIN, LOW); // Turn the LED off
delay(500); // Wait for 500 milliseconds
}
The board is not detected via USB:
0 for normal operation.Unable to upload code:
The board is overheating:
GPIO pins are not functioning as expected:
Q: Can I use the STM32 Blue Pill with the Arduino IDE?
A: Yes, you can use the Arduino IDE by installing the STM32duino core. This allows you to program the board using Arduino syntax.
Q: What is the maximum current output of the GPIO pins?
A: Each GPIO pin can source or sink up to 20 mA. However, it is recommended to limit the current to 8 mA for long-term reliability.
Q: How do I reset the board?
A: Press the onboard reset button or pull the NRST pin low to reset the microcontroller.
Q: Can I use the STM32 Blue Pill for USB communication?
A: Yes, the board supports USB communication. You may need to configure the USB peripheral in your code.
Q: What is the purpose of the BOOT0 pin?
A: The BOOT0 pin is used to select the boot mode (Flash memory, RAM, or System Memory). It is typically set to 0 for normal operation.