

The STM32F103 is a 32-bit microcontroller developed by STMicroelectronics, based on the ARM Cortex-M3 core. It is renowned for its low power consumption, high performance, and a rich set of peripherals, making it a versatile choice for embedded systems and IoT applications. The STM32F103 is part of the STM32 family and is available in various configurations to suit different project requirements.








The STM32F103 microcontroller is available in multiple variants, such as STM32F103C8, STM32F103RB, etc., with slight differences in memory and pin count. Below are the general technical specifications:
| Feature | Details |
|---|---|
| Core | ARM Cortex-M3, 32-bit RISC architecture |
| Operating Frequency | Up to 72 MHz |
| Flash Memory | 16 KB to 1 MB (depending on the variant) |
| SRAM | 6 KB to 96 KB (depending on the variant) |
| GPIO Pins | Up to 80 GPIOs (depending on the package) |
| Communication Interfaces | USART, SPI, I2C, CAN, USB 2.0 FS, and more |
| Timers | 16-bit and 32-bit timers, PWM support |
| ADC | 12-bit ADC with up to 16 channels |
| DAC | 12-bit DAC (available on some variants) |
| Operating Voltage | 2.0V to 3.6V |
| Power Consumption | Low-power modes available (Sleep, Stop, and Standby) |
| Temperature Range | -40°C to +85°C (industrial grade) |
| Packages | LQFP, TQFP, QFN, and others |
The STM32F103 is available in different packages, such as 48-pin, 64-pin, and 100-pin variants. Below is an example pinout for the STM32F103C8T6 (48-pin package):
| Pin Number | Pin Name | Function |
|---|---|---|
| 1 | VDD | Power supply (3.3V) |
| 2 | VDDA | Analog power supply |
| 3 | PA0 | GPIO, ADC_IN0, TIM2_CH1 |
| 4 | PA1 | GPIO, ADC_IN1, TIM2_CH2 |
| 5 | PA2 | GPIO, USART2_TX, TIM2_CH3 |
| 6 | PA3 | GPIO, USART2_RX, TIM2_CH4 |
| ... | ... | ... |
| 48 | VSS | Ground |
Refer to the official datasheet for the complete pinout of your specific STM32F103 variant.
The STM32F103 can be programmed using the Arduino IDE with the STM32duino core. Below is an example code to blink an LED connected to pin PA5:
// Include the STM32 HAL library
#include <Arduino.h>
// Define the LED pin
#define LED_PIN PA5
void setup() {
pinMode(LED_PIN, OUTPUT); // Set PA5 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
}
Microcontroller Not Responding
Unable to Program the Microcontroller
Peripherals Not Working
High Power Consumption
Q: Can I use the STM32F103 with 5V logic devices?
A: No, the STM32F103 operates at 3.3V logic levels. Use level shifters to interface with 5V devices.
Q: How do I select the correct STM32F103 variant for my project?
A: Consider factors such as required Flash memory, SRAM, GPIO count, and package size when selecting a variant.
Q: Can I program the STM32F103 without an ST-Link?
A: Yes, you can use the built-in bootloader to program the microcontroller via USART or USB (if supported).
Q: What is the maximum clock speed of the STM32F103?
A: The STM32F103 can operate at a maximum clock speed of 72 MHz.
For more detailed information, refer to the official STM32F103 datasheet and reference manual.