

The STM32F103RB is a 32-bit microcontroller developed by STMicroelectronics. It is part of the STM32 family and is based on the ARM Cortex-M3 core. This microcontroller is designed for high-performance applications, offering a clock speed of up to 72 MHz, 128 KB of flash memory, and a wide range of peripherals for communication, control, and data processing.








| Parameter | Value |
|---|---|
| Core | ARM Cortex-M3 |
| Clock Speed | Up to 72 MHz |
| Flash Memory | 128 KB |
| SRAM | 20 KB |
| Operating Voltage | 2.0 V to 3.6 V |
| GPIO Pins | 51 |
| Communication Interfaces | USART, SPI, I2C, CAN, USB |
| Timers | 3 general-purpose, 1 advanced |
| ADC | 12-bit, up to 16 channels |
| Package | LQFP64 (64-pin) |
The STM32F103RB comes in an LQFP64 package with 64 pins. Below is a table summarizing the key pin functions:
| Pin Number | Pin Name | Function(s) |
|---|---|---|
| 1 | VDD | Power supply (3.3 V) |
| 2 | VSS | Ground |
| 10 | PA0 | GPIO, ADC_IN0, WKUP |
| 22 | PB6 | GPIO, I2C1_SCL, USART1_TX |
| 23 | PB7 | GPIO, I2C1_SDA, USART1_RX |
| 31 | PC13 | GPIO, TAMPER-RTC |
| 50 | PA9 | GPIO, USART1_TX |
| 51 | PA10 | GPIO, USART1_RX |
| 64 | NRST | Reset |
For a complete pinout, refer to the STM32F103RB datasheet provided by STMicroelectronics.
The STM32F103RB can be programmed using the Arduino IDE with the STM32 core installed. Below is an example of blinking an LED connected to pin PA5:
// Define the LED pin
#define LED_PIN PA5
void setup() {
// Set the LED pin as output
pinMode(LED_PIN, OUTPUT);
}
void loop() {
// Turn the LED on
digitalWrite(LED_PIN, HIGH);
delay(500); // Wait for 500 ms
// Turn the LED off
digitalWrite(LED_PIN, LOW);
delay(500); // Wait for 500 ms
}
Note: Install the STM32 core in the Arduino IDE by navigating to
File > Preferences, adding the STM32 board manager URL, and installing the STM32 package via the Board Manager.
Microcontroller Not Responding
Programming Failure
Peripheral Not Working
Overheating
Q: Can the STM32F103RB operate at 5 V?
A: No, the STM32F103RB operates at a voltage range of 2.0 V to 3.6 V. Use level shifters for 5 V devices.
Q: How do I reset the microcontroller?
A: Use the NRST pin or issue a software reset command in the firmware.
Q: Can I use the STM32F103RB for USB communication?
A: Yes, the STM32F103RB has a USB 2.0 full-speed interface for communication.
Q: What development tools are recommended?
A: Use STM32CubeIDE, Keil uVision, or the Arduino IDE with the STM32 core for development.
This concludes the documentation for the STM32F103RB microcontroller. For further details, refer to the official datasheet and reference manual provided by STMicroelectronics.