STM32F103C
AI

The **STM32F103C8T6**, commonly known as the "Blue Pill" microcontroller, is a popular 32-bit MCU based on the ARM Cortex-M3 core. It is widely used due to its high performance, low cost, and rich set of peripherals.
---
## 1. Core Specifications
The core architecture determines the processing power and efficiency of the chip.
| Feature | Specification |
| :--- | :--- |
| **Core** | ARM® 32-bit Cortex®-M3 |
| **Maximum Frequency** | 72 MHz |
| **Flash Memory** | 64 KB (often 128 KB in practice) |
| **SRAM** | 20 KB |
| **Operating Voltage** | 2.0V to 3.6V |
---
## 2. Key Internal Electronic Components
The STM32F103C is composed of several functional blocks that handle different tasks:
### A. Connectivity & Communication
* **UART/USART:** 3 ports for serial communication with GPS, Bluetooth, or PCs.
* **SPI:** 2 ports for high-speed data exchange with SD cards or displays.
* **I2C:** 2 ports for connecting sensors and OLED screens.
* **USB:** 1x USB 2.0 Full Speed interface.
* **CAN:** 1x Controller Area Network for automotive/industrial use.
### B. Analog to Digital Conversion (ADC)
* **Resolution:** 12-bit.
* **Channels:** Up to 10 external channels.
* **Function:** Converts analog signals (like voltage from a potentiometer) into digital values the CPU can process.
### C. Timers and PWM
* **Advanced Control Timers:** 1x 16-bit timer with Dead-time generation (used for motor control).
* **General Purpose Timers:** 3x 16-bit timers for PWM output, pulse counting, or time delays.
---
## 3. Physical Pinout Categories
The pins on the chip are grouped by their electronic function:
1. **Power Pins:** `VCC` (3.3V) and `GND`.
2. **GPIO (General Purpose I/O):** Most pins can be configured as inputs (buttons) or outputs (LEDs).
3. **Reset (NRST):** Used to restart the microcontroller.
4. **Clock Pins:** `OSC_IN` and `OSC_OUT` for connecting an external crystal oscillator (usually 8MHz).
5. **Debug Pins:** `SWDIO` and `SWCLK` for programming and debugging via Serial Wire Debug (SWD).
---
## 4. Typical Application Circuit
To make the chip functional on a PCB, several external electronic parts are required:
```mermaid
graph LR
A[3.3V Regulator] --> B(STM32F103C)
C[8MHz Crystal] --- B
D[Decoupling Caps 0.1uF] --- B
E[Reset Button/Cap] --- B
B --- F[USB Interface]
```
### Required External Parts:
* **Decoupling Capacitors:** Usually 100nF ceramic capacitors placed near the VCC pins to filter electronic noise.
* **Crystal Oscillators:** An 8MHz crystal for the system clock and a 32.768kHz crystal for the Real-Time Clock (RTC).
* **Pull-up/down Resistors:** Used on the BOOT pins to define whether the chip starts from Flash or System Memory.
---
- ⤷
What is the difference between the STM32F103C8 and the STM32F103CB?
- ⤷ How do you program an STM32F103C using the SWD interface?
- ⤷ What are the power consumption modes available for this microcontroller?