STM32F103
| Device | Package | Body size | Flash | GPIO lines | ADC inputs |
|---|---|---|---|---|---|
| STM32F103C8T6 | LQFP48 | 7 × 7 mm | 64 KiB | 37 | 10 |
| STM32F103RBT6 | LQFP64 | 10 × 10 mm | 128 KiB | 51 | 16 |
Pinout
Scroll horizontally to explore the diagram when it does not fit.
VBAT without a separate backup supply
left edge · pin names and signals
Details for the selected pin
#1 VBAT
Supply inputBackup power for the RTC, low-speed oscillator and backup registers.
Pin dependencies
Without a separate backup source. ST recommends tying VBAT to VDD and placing a 100 nF ceramic capacitor from that node to ground.
With a separate backup source. If VDD reaches its operating level in less than tRSTTEMPO and VDD > VBAT + 0.6 V, current can flow back into the backup source through VBAT. If the source cannot tolerate this current, ST recommends a low-drop diode in series with the source, with its cathode toward VBAT.
VBAT-only power. PC13 supports tamper input and RTC alarm or second output. PC14/PC15 are reserved for LSE.
- Backup supply
- 1.8–3.6 V
- Without a backup supply
- Connect VBAT to VDD
VBAT without a separate backup supply
Connect VBAT to VDD when there is no separate backup supply. See ST AN2586 §§2.1.2 and 2.2.
Digital supply connections
Pin list
64 / 64Open a pin for wiring and electrical details. Dotted underlines indicate a tooltip.
| Pin | Purpose | Voltage & limits | Signals |
|---|---|---|---|
| #1 VBAT | Backup power for the RTC, low-speed oscillator and backup registers. |
| — |
| #2 PC13 | Port C bit 13. Tamper input for the RTC backup domain. |
| Real-time clock (RTC) tamper detection input. |
| #3 PC14 | Port C bit 14. Input for the 32.768 kHz LSE crystal or external RTC clock. |
| Low-speed external (LSE) oscillator input for a 32.768 kHz crystal or external clock. |
| #4 PC15 | Port C bit 15. LSE crystal amplifier output. Leave open in external clock bypass mode. |
| Low-speed external (LSE) crystal oscillator output. |
| #5 OSC_IN | Input for the HSE crystal or external clock. Use PD01_REMAP = 1 for PD0 when HSE is unused. |
| Remapped Port D bit 0 when HSE is unused. External interrupts and events (EXTI) are unavailable on this remapped pin in LQFP48 and LQFP64. AFIO_MAPR.PD01_REMAP = 1. |
| #6 OSC_OUT | HSE crystal amplifier output. Leave open in external clock bypass mode. Use PD01_REMAP = 1 for PD1 when HSE is unused. |
| Remapped Port D bit 1 when HSE is unused. External interrupts and events (EXTI) are unavailable on this remapped pin in LQFP48 and LQFP64. AFIO_MAPR.PD01_REMAP = 1. |
| #7 NRST | Active-low reset with an internal pull-up. Pull low to reset the chip. |
| — |
| #8 PC0 | Port C bit 0. Configurable digital input or output. |
| Analog-to-digital converter (ADC) 1 or 2, analog input channel 10. |
| #9 PC1 | Port C bit 1. Configurable digital input or output. |
| Analog-to-digital converter (ADC) 1 or 2, analog input channel 11. |
| #10 PC2 | Port C bit 2. Configurable digital input or output. |
| Analog-to-digital converter (ADC) 1 or 2, analog input channel 12. |
| #11 PC3 | Port C bit 3. Configurable digital input or output. |
| Analog-to-digital converter (ADC) 1 or 2, analog input channel 13. |
| #12 VSSA | Analog ground and internal negative ADC reference for these packages. |
| — |
| #13 VDDA | Analog supply and internal positive ADC reference for these packages. |
| — |
| #14 PA0 | Port A bit 0. Wake-up input for Standby mode. Also available as ADC channel 0, USART2 CTS or TIM2 channel 1 / external trigger. |
| Standby wake-up input. Universal synchronous/asynchronous receiver/transmitter (USART) 2, clear-to-send input. Analog-to-digital converter (ADC) 1 or 2, analog input channel 0. Timer 2, channel 1 input capture, output compare or pulse-width modulation (PWM), or external trigger input. |
| #15 PA1 | Port A bit 1. Configurable digital input or output. |
| Universal synchronous/asynchronous receiver/transmitter (USART) 2, request-to-send output. Analog-to-digital converter (ADC) 1 or 2, analog input channel 1. Timer 2, channel 2 input capture, output compare or pulse-width modulation (PWM). |
| #16 PA2 | Port A bit 2. Configurable digital input or output. |
| Universal synchronous/asynchronous receiver/transmitter (USART) 2, transmit data output. Analog-to-digital converter (ADC) 1 or 2, analog input channel 2. Timer 2, channel 3 input capture, output compare or pulse-width modulation (PWM). |
| #17 PA3 | Port A bit 3. Configurable digital input or output. |
| Universal synchronous/asynchronous receiver/transmitter (USART) 2, receive data input. Analog-to-digital converter (ADC) 1 or 2, analog input channel 3. Timer 2, channel 4 input capture, output compare or pulse-width modulation (PWM). |
| #18 VSS_4 | Digital ground return. Connect every VSS pin. |
| — |
| #19 VDD_4 | Main digital supply. Connect every VDD pin. |
| — |
| #20 PA4 | Port A bit 4. Configurable digital input or output. |
| Serial Peripheral Interface (SPI) 1, negative slave select (chip select), input in slave mode or input/output in master mode. Universal synchronous/asynchronous receiver/transmitter (USART) 2, synchronous clock output. Analog-to-digital converter (ADC) 1 or 2, analog input channel 4. |
| #21 PA5 | Port A bit 5. Configurable digital input or output. |
| Serial Peripheral Interface (SPI) 1, serial clock, output in master mode or input in slave mode. Analog-to-digital converter (ADC) 1 or 2, analog input channel 5. |
| #22 PA6 | Port A bit 6. Configurable digital input or output. |
| Serial Peripheral Interface (SPI) 1, master in, slave out: data from slave to master. Analog-to-digital converter (ADC) 1 or 2, analog input channel 6. Timer 3, channel 1 input capture, output compare or pulse-width modulation (PWM). Remapped Timer 1, break input for shutting off timer outputs. AFIO_MAPR.TIM1_REMAP = 01. |
| #23 PA7 | Port A bit 7. Configurable digital input or output. |
| Serial Peripheral Interface (SPI) 1, master out, slave in: data from master to slave. Analog-to-digital converter (ADC) 1 or 2, analog input channel 7. Timer 3, channel 2 input capture, output compare or pulse-width modulation (PWM). Remapped Timer 1, channel 1 complementary pulse-width modulation (PWM) output. AFIO_MAPR.TIM1_REMAP = 01. |
| #24 PC4 | Port C bit 4. Configurable digital input or output. |
| Analog-to-digital converter (ADC) 1 or 2, analog input channel 14. |
| #25 PC5 | Port C bit 5. Configurable digital input or output. |
| Analog-to-digital converter (ADC) 1 or 2, analog input channel 15. |
| #26 PB0 | Port B bit 0. Configurable digital input or output. |
| Analog-to-digital converter (ADC) 1 or 2, analog input channel 8. Timer 3, channel 3 input capture, output compare or pulse-width modulation (PWM). Remapped Timer 1, channel 2 complementary pulse-width modulation (PWM) output. AFIO_MAPR.TIM1_REMAP = 01. |
| #27 PB1 | Port B bit 1. Configurable digital input or output. |
| Analog-to-digital converter (ADC) 1 or 2, analog input channel 9. Timer 3, channel 4 input capture, output compare or pulse-width modulation (PWM). Remapped Timer 1, channel 3 complementary pulse-width modulation (PWM) output. AFIO_MAPR.TIM1_REMAP = 01. |
| #28 PB2 | Port B bit 2. Acts as BOOT1 at reset when BOOT0 is high: low selects system memory, high selects SRAM. |
| After reset Port B bit 2 / boot selection input 1. Sampled with BOOT0 to select the boot memory. |
| #29 PB10 | Port B bit 10. Configurable digital input or output. |
| Inter-Integrated Circuit (I²C) 2, open-drain clock line. Use an external pull-up. Universal synchronous/asynchronous receiver/transmitter (USART) 3, transmit data output. Remapped Timer 2, channel 3 input capture, output compare or pulse-width modulation (PWM). AFIO_MAPR.TIM2_REMAP = 10 or 11. |
| #30 PB11 | Port B bit 11. Configurable digital input or output. |
| Inter-Integrated Circuit (I²C) 2, open-drain data line. Use an external pull-up. Universal synchronous/asynchronous receiver/transmitter (USART) 3, receive data input. Remapped Timer 2, channel 4 input capture, output compare or pulse-width modulation (PWM). AFIO_MAPR.TIM2_REMAP = 10 or 11. |
| #31 VSS_1 | Digital ground return. Connect every VSS pin. |
| — |
| #32 VDD_1 | Main digital supply. Connect every VDD pin. |
| — |
| #33 PB12 | Port B bit 12. Configurable digital input or output. |
| Serial Peripheral Interface (SPI) 2, negative slave select (chip select), input in slave mode or input/output in master mode. Inter-Integrated Circuit (I²C) 2, System Management Bus (SMBus) alert line. Universal synchronous/asynchronous receiver/transmitter (USART) 3, synchronous clock output. Timer 1, break input for shutting off timer outputs. |
| #34 PB13 | Port B bit 13. Configurable digital input or output. |
| Serial Peripheral Interface (SPI) 2, serial clock, output in master mode or input in slave mode. Universal synchronous/asynchronous receiver/transmitter (USART) 3, clear-to-send input. Timer 1, channel 1 complementary pulse-width modulation (PWM) output. |
| #35 PB14 | Port B bit 14. Configurable digital input or output. |
| Serial Peripheral Interface (SPI) 2, master in, slave out: data from slave to master. Universal synchronous/asynchronous receiver/transmitter (USART) 3, request-to-send output. Timer 1, channel 2 complementary pulse-width modulation (PWM) output. |
| #36 PB15 | Port B bit 15. Configurable digital input or output. |
| Serial Peripheral Interface (SPI) 2, master out, slave in: data from master to slave. Timer 1, channel 3 complementary pulse-width modulation (PWM) output. |
| #37 PC6 | Port C bit 6. Configurable digital input or output. |
| Remapped Timer 3, channel 1 input capture, output compare or pulse-width modulation (PWM). AFIO_MAPR.TIM3_REMAP = 11. |
| #38 PC7 | Port C bit 7. Configurable digital input or output. |
| Remapped Timer 3, channel 2 input capture, output compare or pulse-width modulation (PWM). AFIO_MAPR.TIM3_REMAP = 11. |
| #39 PC8 | Port C bit 8. Configurable digital input or output. |
| Remapped Timer 3, channel 3 input capture, output compare or pulse-width modulation (PWM). AFIO_MAPR.TIM3_REMAP = 11. |
| #40 PC9 | Port C bit 9. Configurable digital input or output. |
| Remapped Timer 3, channel 4 input capture, output compare or pulse-width modulation (PWM). AFIO_MAPR.TIM3_REMAP = 11. |
| #41 PA8 | Port A bit 8. Configurable digital input or output. |
| Universal synchronous/asynchronous receiver/transmitter (USART) 1, synchronous clock output. Timer 1, channel 1 input capture, output compare or pulse-width modulation (PWM). Microcontroller clock output. |
| #42 PA9 | Port A bit 9. Configurable digital input or output. |
| Universal synchronous/asynchronous receiver/transmitter (USART) 1, transmit data output. Timer 1, channel 2 input capture, output compare or pulse-width modulation (PWM). |
| #43 PA10 | Port A bit 10. Configurable digital input or output. |
| Universal synchronous/asynchronous receiver/transmitter (USART) 1, receive data input. Timer 1, channel 3 input capture, output compare or pulse-width modulation (PWM). |
| #44 PA11 | Port A bit 11. USB Full Speed D−, CAN receive, USART1 CTS or TIM1 channel 4. |
| Universal synchronous/asynchronous receiver/transmitter (USART) 1, clear-to-send input. Controller Area Network (CAN) receive input. Connect to the receive-data output (RXD) of a CAN transceiver. Universal Serial Bus (USB), Full Speed negative data line (D−). Timer 1, channel 4 input capture, output compare or pulse-width modulation (PWM). |
| #45 PA12 | Port A bit 12. USB Full Speed D+, CAN transmit, USART1 RTS or TIM1 external trigger. |
| Universal synchronous/asynchronous receiver/transmitter (USART) 1, request-to-send output. Controller Area Network (CAN) transmit output. Connect to the transmit-data input (TXD) of a CAN transceiver. Universal Serial Bus (USB), Full Speed positive data line (D+). Pull up with 1.5 kΩ to 3.0–3.6 V. Timer 1, external trigger input. |
| #46 PA13 | SWD data (SWDIO) or JTAG mode select (JTMS) after reset. Can be released for GPIO. |
| After reset Joint Test Action Group (JTAG) test mode select / Serial Wire Debug (SWD) bidirectional data line. |
| #47 VSS_2 | Digital ground return. Connect every VSS pin. |
| — |
| #48 VDD_2 | Main digital supply. Connect every VDD pin. |
| — |
| #49 PA14 | SWD clock (SWCLK) or JTAG clock (JTCK) after reset. Can be released for GPIO. |
| After reset JTAG test clock / Serial Wire Debug (SWD) clock input. |
| #50 PA15 | JTAG data input (JTDI) after reset. Can be released for GPIO, SPI1 chip select or TIM2 channel 1 / external trigger. |
| After reset JTAG test data input. Remapped Timer 2, channel 1 input capture, output compare or pulse-width modulation (PWM), or external trigger input. AFIO_MAPR.TIM2_REMAP = 01 or 11. Serial Peripheral Interface (SPI) 1, negative slave select (chip select), input in slave mode or input/output in master mode. AFIO_MAPR.SPI1_REMAP = 1. |
| #51 PC10 | Port C bit 10. Configurable digital input or output. |
| Remapped Universal synchronous/asynchronous receiver/transmitter (USART) 3, transmit data output. AFIO_MAPR.USART3_REMAP = 01. |
| #52 PC11 | Port C bit 11. Configurable digital input or output. |
| Remapped Universal synchronous/asynchronous receiver/transmitter (USART) 3, receive data input. AFIO_MAPR.USART3_REMAP = 01. |
| #53 PC12 | Port C bit 12. Configurable digital input or output. |
| Remapped Universal synchronous/asynchronous receiver/transmitter (USART) 3, synchronous clock output. AFIO_MAPR.USART3_REMAP = 01. |
| #54 PD2 | Port D bit 2. Configurable digital input or output. |
| Timer 3, external trigger input. |
| #55 PB3 | JTAG data output (JTDO) or trace output (TRACESWO). Can also carry SPI1 clock or TIM2 channel 2. |
| After reset JTAG test data output / Serial Wire Output (SWO) trace data output. Remapped Timer 2, channel 2 input capture, output compare or pulse-width modulation (PWM). AFIO_MAPR.TIM2_REMAP = 01 or 11. Serial Peripheral Interface (SPI) 1, serial clock, output in master mode or input in slave mode. AFIO_MAPR.SPI1_REMAP = 1. |
| #56 PB4 | JTAG reset (JNTRST) after reset. Can also carry SPI1 MISO or TIM3 channel 1. |
| After reset JTAG test reset input, active low. Remapped Timer 3, channel 1 input capture, output compare or pulse-width modulation (PWM). AFIO_MAPR.TIM3_REMAP = 10. Serial Peripheral Interface (SPI) 1, master in, slave out: data from slave to master. AFIO_MAPR.SPI1_REMAP = 1. |
| #57 PB5 | Port B bit 5. Configurable digital input or output. |
| Inter-Integrated Circuit (I²C) 1, System Management Bus (SMBus) alert line. Remapped Timer 3, channel 2 input capture, output compare or pulse-width modulation (PWM). AFIO_MAPR.TIM3_REMAP = 10. Serial Peripheral Interface (SPI) 1, master out, slave in: data from master to slave. AFIO_MAPR.SPI1_REMAP = 1. |
| #58 PB6 | Port B bit 6. Configurable digital input or output. |
| Inter-Integrated Circuit (I²C) 1, open-drain clock line. Use an external pull-up. Timer 4, channel 1 input capture, output compare or pulse-width modulation (PWM). Remapped Universal synchronous/asynchronous receiver/transmitter (USART) 1, transmit data output. AFIO_MAPR.USART1_REMAP = 1. |
| #59 PB7 | Port B bit 7. Configurable digital input or output. |
| Inter-Integrated Circuit (I²C) 1, open-drain data line. Use an external pull-up. Timer 4, channel 2 input capture, output compare or pulse-width modulation (PWM). Remapped Universal synchronous/asynchronous receiver/transmitter (USART) 1, receive data input. AFIO_MAPR.USART1_REMAP = 1. |
| #60 BOOT0 | Sampled at reset. Low selects user Flash. High selects system memory or SRAM according to BOOT1. |
| — |
| #61 PB8 | Port B bit 8. Configurable digital input or output. |
| Timer 4, channel 3 input capture, output compare or pulse-width modulation (PWM). Remapped Inter-Integrated Circuit (I²C) 1, open-drain clock line. Use an external pull-up. AFIO_MAPR.I2C1_REMAP = 1. Controller Area Network (CAN) receive input. Connect to the receive-data output (RXD) of a CAN transceiver. AFIO_MAPR.CAN_REMAP = 10. |
| #62 PB9 | Port B bit 9. Configurable digital input or output. |
| Timer 4, channel 4 input capture, output compare or pulse-width modulation (PWM). Remapped Inter-Integrated Circuit (I²C) 1, open-drain data line. Use an external pull-up. AFIO_MAPR.I2C1_REMAP = 1. Controller Area Network (CAN) transmit output. Connect to the transmit-data input (TXD) of a CAN transceiver. AFIO_MAPR.CAN_REMAP = 10. |
| #63 VSS_3 | Digital ground return. Connect every VSS pin. |
| — |
| #64 VDD_3 | Main digital supply. Connect every VDD pin. |
| — |
Common specifications
| Feature | Value |
|---|---|
| Arm core | Cortex-M3 |
| CPU clock (max) | 72 MHz |
| SRAM | 20 KiB |
| VDD range | 2.0–3.6 V |
| ADC units | 2 × 12-bit |
| USART | 3 |
| SPI | 2 |
| I²C | 2 |
| USB device | Full Speed |
| Classical CAN | 2.0B |
USB and CAN share packet memory on both models. Only one can run at a time.
Electrical reference tables
Electrical specifications for the pins and modes shown above. Source: ST DS5319 Rev 19.
Table 5 · PC13–PC15 output limits
| Parameter | Value and conditions |
|---|---|
| PC13–PC15 output speed | ≤ 2 MHzLoad capacitance ≤ 30 pF |
| PC13–PC15 output current | ≤ 3 mA sinkingDo not use as a current source. |
Table 9 · Supply and input voltage ranges
| Parameter | Value and conditions |
|---|---|
| Backup supply | 1.8–3.6 V |
| Digital input range | −0.3 V to VDD + 0.3 VStandard I/O |
| Analog supply | 2.0–3.6 VADC off. Use the same supply source as VDD. |
| Digital supply | 2.0–3.6 VRelative to VSS |
| Digital input range | −0.3 to 5.5 V5 V-tolerant I/O at 2.0 V < VDD ≤ 3.6 V |
| Digital input range | −0.3 to 5.2 V5 V-tolerant I/O at VDD = 2.0 V |
| BOOT0 input range | 0–5.5 V |
Table 20 · HSE bypass clock
| Parameter | Value and conditions |
|---|---|
| External clock LOW | VSS to 0.3 × VDD |
| External clock HIGH | 0.7 × VDD to VDD |
| HSE bypass clock frequency | 1–25 MHz |
Table 21 · LSE bypass clock
| Parameter | Value and conditions |
|---|---|
| External clock LOW | VSS to 0.3 × VDD |
| External clock HIGH | 0.7 × VDD to VDD |
Table 36 · Digital input thresholds and internal pulls
| Parameter | Value and conditions |
|---|---|
| Input LOW | ≤ 0.35 × VDD≤ 1.155 V at VDD = 3.3 V |
| Input HIGH | ≥ 0.65 × VDD≥ 2.145 V at VDD = 3.3 V |
| Internal pull-up or pull-down | 30–50 kΩ |
| Internal pulls above VDD + 0.3 V | Disable both pull-up and pull-down |
Table 37 · GPIO output levels
| Parameter | Value and conditions |
|---|---|
| Push-pull output LOW | ≤ 0.4 VWhen remapped to PD1 · At VDD = 3.3 V and 8 mA load |
| Push-pull output HIGH | ≥ 2.9 VWhen remapped to PD1 · At VDD = 3.3 V and 8 mA load |
| Push-pull output LOW | ≤ 0.4 VAt VDD = 3.3 V and 8 mA load |
| Push-pull output HIGH | ≥ 2.9 VAt VDD = 3.3 V and 8 mA load |
Table 39 · Reset input
| Parameter | Value and conditions |
|---|---|
| Reset input LOW | ≤ 0.8 V |
| Reset input HIGH | ≥ 2.0 V |
| Internal reset pull-up | 30–50 kΩ |
| Low pulse that passes the reset filter | ≥ 300 ns |
Table 45 · USB Full Speed supply
| Parameter | Value and conditions |
|---|---|
| USB Full Speed supply | 3.0–3.6 VVDD in USB mode. Use USB data-line signal levels. |
Table 47 · ADC input range
| Parameter | Value and conditions |
|---|---|
| ADC input range | VSSA to VDDA0–3.3 V at VDDA = 3.3 V. Analog mode, 12-bit ADC. |
| Analog supply | 2.4–3.6 VADC enabled. Use the same supply source as VDD. |
Figure 14 · Supply decoupling
| Parameter | Value and conditions |
|---|---|
| Bypass capacitors | 10 nF and 1 µFBetween VDDA and VSSA |
| Digital supply decoupling | 100 nF at each VDD pin |
| Bulk capacitor | 4.7 µF at VDD_3 |
Figure 31 · Reset capacitor
| Parameter | Value and conditions |
|---|---|
| Reset capacitor | 100 nFBetween NRST and ground |
Documentation and discussions
- Datasheet for STM32F103· ST DS5319 Rev 19 · PDF
- Reference manual for STM32F10xxx· ST RM0008 Rev 21 · PDF
- Custom STM32F103C8T6 board · Spark Logic
- STM32F103C8T6 power consumption · Spark Logic
