Nucleo-G071RB pinout
The Nucleo-G071RB (STM32G071RB) pinout: what each pin does, from GPIO, analog inputs and PWM to UART, I2C and SPI, with the notes that catch people out.
The board
- Microcontroller: STM32G071RBT6, 32-bit Arm Cortex-M0+
- Clock: 64 MHz (the 16 MHz HSI16 × 8 / 2 through the PLL)
- Flash / SRAM: 128 KB / 36 KB
- Logic level: 3.3 V; every pin is 5 V tolerant but PA4 and PA5 (3.6 V)
- Analog inputs: 16 pin channels (PA0–PA7, PB0–PB2, PB10–PB12, PC4, PC5), 12-bit
- PWM: Timer channels TIM1, TIM2 (32-bit), TIM3, TIM14–TIM17: 1 kHz by default
- Serial: LPUART1 on PA2/PA3 through the ST-LINK (Serial); USART1 on D0/D1 (PC5/PC4)
- I2C and SPI: Wire is I2C1 on D14/D15 (PB9/PB8), SPI is SPI1 on D11–D13 (SCK shares PA5 with the LED); I2C2 on PB11/PB10, SPI2 on PB12–PB15
- External interrupts: Any pin: EXTI line n takes pin n of one port
- On-board LED: LD4 on D13 (PA5), lit HIGH
- Buttons: B1 USER on PC13 (USER_BTN): the board pulls it up, so it reads LOW while pressed; B2 resets
Pins
| Pin | Functions | Notes |
|---|---|---|
| PC10 | PC10, EXTI10, TIM1_CH3, ~PWM | analogWrite() PWM from TIM1_CH3, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PC10), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC11 | PC11, EXTI11, TIM1_CH4, ~PWM | analogWrite() PWM from TIM1_CH4, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PC11), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC12 | PC12, EXTI12, TIM14_CH1, ~PWM | analogWrite() PWM from TIM14_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PC12), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PD2 | PD2, EXTI2 | External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PD2), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA14 | PA14, EXTI14, SWCLK | Serial Wire Debug clock, wired to the ST-LINK; also BOOT0, read at reset. External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PA14), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PD0 | PD0, EXTI0, TIM16_CH1, ~PWM | analogWrite() PWM from TIM16_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PD0), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PD1 | PD1, EXTI1, TIM17_CH1, ~PWM | analogWrite() PWM from TIM17_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PD1), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PD3 | PD3, EXTI3 | External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PD3), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA13 | PA13, EXTI13, SWDIO | Serial Wire Debug data, wired to the ST-LINK: leave it to the debugger. External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PA13), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PD4 | PD4, EXTI4 | External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PD4), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA15 | PA15, EXTI15, USART2 RX, TIM2_CH1, ~PWM | USART2 receive. analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PA15), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB7 | PB7, EXTI7, I2C1 SDA, USART1 RX | I2C1 data (alternate pin). USART1 receive (alternate pin). External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PB7), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC13 | PC13, EXTI13, B1 USER | The blue USER button B1 (USER_BTN), which pulls the pin low when pressed. External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PC13), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC14 | PC14, EXTI14, OSC32_IN | The 32.768 kHz crystal for the RTC sits here on the board. External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PC14), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PD5 | PD5, EXTI5, USART2 TX | USART2 transmit. External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PD5), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC15 | PC15, EXTI15, OSC32_OUT | The 32.768 kHz crystal's other side. External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PC15), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA0 | PA0, EXTI0, A0, ADC0, TIM2_CH1, ~PWM | The Arduino header's A0: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 0 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PA0), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PF0 | PF0, EXTI0, OSC_IN, TIM14_CH1, ~PWM | The HSE input; the board has no HSE crystal fitted, so the core runs from HSI16. analogWrite() PWM from TIM14_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PF0), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA1 | PA1, EXTI1, A1, ADC1, TIM2_CH2, ~PWM | The Arduino header's A1: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 1 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH2, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PA1), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PF1 | PF1, EXTI1, OSC_OUT | The HSE output, free with no crystal fitted. External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PF1), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA4 | PA4, EXTI4, A2, ADC4, TIM14_CH1, SPI1 NSS, ~PWM | The Arduino header's A2: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 4 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM14_CH1, 1 kHz by default (analogWriteFrequency()). SPI1 chip select. External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PA4), handler, mode). Not 5 V tolerant: keep it at 3.3 V or below. |
| PB1 | PB1, EXTI1, A3, ADC9, TIM3_CH4, ~PWM | The Arduino header's A3: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 9 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM3_CH4, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PB1), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC2 | PC2, EXTI2, TIM15_CH2, ~PWM | analogWrite() PWM from TIM15_CH2, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PC2), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB11 | PB11, EXTI11, A4, ADC15, TIM2_CH4, I2C2 SDA, ~PWM | The Arduino header's A4: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 15 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH4, 1 kHz by default (analogWriteFrequency()). I2C2 data. External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PB11), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC3 | PC3, EXTI3 | External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PC3), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB12 | PB12, EXTI12, A5, ADC16, SPI2 NSS | The Arduino header's A5: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 16 (12-bit; the core returns 10 bits unless analogReadResolution(12)). SPI2 chip select. External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PB12), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC9 | PC9, EXTI9, TIM3_CH4, ~PWM | analogWrite() PWM from TIM3_CH4, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PC9), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC8 | PC8, EXTI8, TIM3_CH3, ~PWM | analogWrite() PWM from TIM3_CH3, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PC8), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB8 | PB8, EXTI8, D15, I2C1 SCL, TIM16_CH1, ~PWM | The Arduino header's D15: the same pin, under that name in code too. I2C1 clock for Wire. analogWrite() PWM from TIM16_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PB8), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC6 | PC6, EXTI6, TIM3_CH1, ~PWM | analogWrite() PWM from TIM3_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PC6), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB9 | PB9, EXTI9, D14, I2C1 SDA, TIM17_CH1, ~PWM | The Arduino header's D14: the same pin, under that name in code too. I2C1 data for Wire. analogWrite() PWM from TIM17_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PB9), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA3 | PA3, EXTI3, ADC3, LPUART1 RX, TIM2_CH4, ~PWM | Analog input: analogRead() reads ADC channel 3 (12-bit; the core returns 10 bits unless analogReadResolution(12)). LPUART1 receive: what the Serial Monitor sends, through the ST-LINK. analogWrite() PWM from TIM2_CH4, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PA3), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PD6 | PD6, EXTI6, USART2 RX | USART2 receive. External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PD6), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA5 | PA5, EXTI5, D13, ADC5, LD4, TIM2_CH1, SPI1 SCK, ~PWM | The Arduino header's D13: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 5 (12-bit; the core returns 10 bits unless analogReadResolution(12)). The green LED LD4: digitalWrite(LED_BUILTIN, HIGH) lights it. analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). SPI1 clock, the SPI library's SCK. External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PA5), handler, mode). Not 5 V tolerant: keep it at 3.3 V or below. |
| PA12 | PA12, EXTI12 | External interrupt on EXTI line 12: attachInterrupt(digitalPinToInterrupt(PA12), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA6 | PA6, EXTI6, D12, ADC6, TIM3_CH1, SPI1 MISO, ~PWM | The Arduino header's D12: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 6 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM3_CH1, 1 kHz by default (analogWriteFrequency()). SPI1 data in. External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PA6), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA11 | PA11, EXTI11, TIM1_CH4, ~PWM | analogWrite() PWM from TIM1_CH4, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 11: attachInterrupt(digitalPinToInterrupt(PA11), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA7 | PA7, EXTI7, D11, ADC7, TIM3_CH2, SPI1 MOSI, ~PWM | The Arduino header's D11: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 7 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM3_CH2, 1 kHz by default (analogWriteFrequency()). SPI1 data out. External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PA7), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC1 | PC1, EXTI1, LPUART1 TX, TIM15_CH1, ~PWM | LPUART1 transmit (alternate pin). analogWrite() PWM from TIM15_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 1: attachInterrupt(digitalPinToInterrupt(PC1), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB0 | PB0, EXTI0, D10, ADC8, TIM3_CH3, ~PWM | The Arduino header's D10: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 8 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM3_CH3, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PB0), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC0 | PC0, EXTI0, LPUART1 RX | LPUART1 receive (alternate pin). External interrupt on EXTI line 0: attachInterrupt(digitalPinToInterrupt(PC0), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC7 | PC7, EXTI7, D9, TIM3_CH2, ~PWM | The Arduino header's D9: the same pin, under that name in code too. analogWrite() PWM from TIM3_CH2, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 7: attachInterrupt(digitalPinToInterrupt(PC7), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA9 | PA9, EXTI9, D8, USART1 TX, TIM1_CH2, ~PWM | The Arduino header's D8: the same pin, under that name in code too. USART1 transmit (alternate pin). analogWrite() PWM from TIM1_CH2, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PA9), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB2 | PB2, EXTI2, ADC10 | Analog input: analogRead() reads ADC channel 10 (12-bit; the core returns 10 bits unless analogReadResolution(12)). External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PB2), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA8 | PA8, EXTI8, D7, TIM1_CH1, MCO, ~PWM | The Arduino header's D7: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH1, 1 kHz by default (analogWriteFrequency()). Can output a clock (MCO). External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PA8), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB6 | PB6, EXTI6, I2C1 SCL, USART1 TX, TIM1_CH3, ~PWM | I2C1 clock (alternate pin). USART1 transmit (alternate pin). analogWrite() PWM from TIM1_CH3, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 6: attachInterrupt(digitalPinToInterrupt(PB6), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB14 | PB14, EXTI14, D6, TIM15_CH1, SPI2 MISO, ~PWM | The Arduino header's D6: the same pin, under that name in code too. analogWrite() PWM from TIM15_CH1, 1 kHz by default (analogWriteFrequency()). SPI2 data in. External interrupt on EXTI line 14: attachInterrupt(digitalPinToInterrupt(PB14), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB15 | PB15, EXTI15, TIM15_CH2, SPI2 MOSI, ~PWM | analogWrite() PWM from TIM15_CH2, 1 kHz by default (analogWriteFrequency()). SPI2 data out. External interrupt on EXTI line 15: attachInterrupt(digitalPinToInterrupt(PB15), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB4 | PB4, EXTI4, D5, TIM3_CH1, ~PWM | The Arduino header's D5: the same pin, under that name in code too. analogWrite() PWM from TIM3_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PB4), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB10 | PB10, EXTI10, ADC11, TIM2_CH3, I2C2 SCL, ~PWM | Analog input: analogRead() reads ADC channel 11 (12-bit; the core returns 10 bits unless analogReadResolution(12)). analogWrite() PWM from TIM2_CH3, 1 kHz by default (analogWriteFrequency()). I2C2 clock: TwoWire Wire2(PB11, PB10). External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PB10), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB5 | PB5, EXTI5, D4, TIM3_CH2, ~PWM | The Arduino header's D4: the same pin, under that name in code too. analogWrite() PWM from TIM3_CH2, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PB5), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB13 | PB13, EXTI13, SPI2 SCK, TIM1_CH1N, ~PWM | SPI2 clock. analogWrite() PWM from TIM1_CH1N, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 13: attachInterrupt(digitalPinToInterrupt(PB13), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PB3 | PB3, EXTI3, D3, TIM1_CH2, SPI1 SCK, ~PWM | The Arduino header's D3: the same pin, under that name in code too. analogWrite() PWM from TIM1_CH2, 1 kHz by default (analogWriteFrequency()). SPI1 clock (alternate pin). External interrupt on EXTI line 3: attachInterrupt(digitalPinToInterrupt(PB3), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA10 | PA10, EXTI10, D2, USART1 RX, TIM1_CH3, ~PWM | The Arduino header's D2: the same pin, under that name in code too. USART1 receive (alternate pin). analogWrite() PWM from TIM1_CH3, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 10: attachInterrupt(digitalPinToInterrupt(PA10), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PA2 | PA2, EXTI2, ADC2, LPUART1 TX, TIM2_CH3, ~PWM | Analog input: analogRead() reads ADC channel 2 (12-bit; the core returns 10 bits unless analogReadResolution(12)). LPUART1 transmit: Serial, which the ST-LINK carries to USB and the Serial Monitor shows. analogWrite() PWM from TIM2_CH3, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 2: attachInterrupt(digitalPinToInterrupt(PA2), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC4 | PC4, EXTI4, D1, ADC17, USART1 TX, TIM2_CH1, ~PWM | The Arduino header's D1: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 17 (12-bit; the core returns 10 bits unless analogReadResolution(12)). USART1 transmit, on the Arduino header's D1: HardwareSerial Serial1(PC5, PC4). analogWrite() PWM from TIM2_CH1, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 4: attachInterrupt(digitalPinToInterrupt(PC4), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PD8 | PD8, EXTI8 | External interrupt on EXTI line 8: attachInterrupt(digitalPinToInterrupt(PD8), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PC5 | PC5, EXTI5, D0, ADC18, USART1 RX, TIM2_CH2, ~PWM | The Arduino header's D0: the same pin, under that name in code too. Analog input: analogRead() reads ADC channel 18 (12-bit; the core returns 10 bits unless analogReadResolution(12)). USART1 receive, on the Arduino header's D0. analogWrite() PWM from TIM2_CH2, 1 kHz by default (analogWriteFrequency()). External interrupt on EXTI line 5: attachInterrupt(digitalPinToInterrupt(PC5), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| PD9 | PD9, EXTI9 | External interrupt on EXTI line 9: attachInterrupt(digitalPinToInterrupt(PD9), handler, mode). 5 V tolerant (FT): a 5 V input is safe. |
| VDD | VDD | The chip's 3.3 V supply. |
| E5V | E5V | An external 5 V supply input (jumper JP5 in E5V). |
| GND | GND | Ground (0 V). |
| IOREF | IOREF | Tells shields the I/O voltage of the board (3.3 V). Not a supply to draw from. |
| +3V3 | +3V3 | 3.3 V from the board's regulator, for parts. |
| +5V | +5V | 5 V from the ST-LINK's USB (or E5V), for parts. |
| GND | GND | Ground (0 V). |
| GND | GND | Ground (0 V). |
| GND | GND | Ground (0 V). |
| AVDD | AVDD | The chip's analog supply (3.3 V), the ADC's reference. |
| U5V | U5V | 5 V straight from the ST-LINK's USB connector. |
| GND | GND | Ground (0 V). |
| GND | GND | Ground (0 V). |
| AGND | AGND | Analog ground (0 V). |
Good to know
- Pins are named by port and bit (PA5), or by the Arduino header (D13, A0): both work in code and when wiring. Here D0 and D1 are USART1 (PC5, PC4), wired to the header.
- Register by register: the ports are on the IOPORT bus, so turn a port's clock on in RCC->IOPENR (RCC_IOPENR_GPIOAEN). Every pin starts in analog mode (MODER 11): set its two bits to 01 for an output or 10 for an alternate function, chosen in AFR[0] or AFR[1].
- Serial is LPUART1, whose BRR is 256 × the clock / the baud rate (USART1 and USART2 use clock / baud).
- The core is a Cortex-M0+: no divide instruction or bit-banding, and an unaligned word access is a HardFault; it has VTOR, so the vector table can move.
- The ADC needs its voltage regulator on (ADC->CR ADVREGEN) before calibration and ADEN; after each write to CHSELR wait for CCRDY. The HAL does both.
- In the simulator, VIN, VBAT and the NC pins connect to nothing; press B1 and B2 on the board drawing.
- Arduino Uno pinout
- Arduino Nano pinout
- Arduino Mega pinout
- ATtiny85 pinout
- ESP32-C3 DevKitM-1 pinout
- ESP32-S3 DevKitC-1 pinout
- ESP32-C5 DevKitC-1 pinout
- ESP32-C6 DevKitC-1 pinout
- ESP32-H2 DevKitM-1 pinout
- ESP32-P4 Function-EV pinout
- Blue Pill (STM32F103C8) pinout
- Nucleo-F030R8 pinout
- Nucleo-F401RE pinout
- Nucleo-F446RE pinout
- Nucleo-F767ZI pinout
- Nucleo-H743ZI2 pinout
- Nucleo-WBA55CG pinout
- Nucleo-L552ZE-Q pinout
- Black Pill (STM32F411CE) pinout
- Raspberry Pi Pico pinout
- Raspberry Pi Pico W pinout
- Raspberry Pi Pico 2 pinout
- Raspberry Pi Pico 2 W pinout