Raspberry Pi's RP2040 is a dual-core 133 MHz ARM Cortex-M0+ MCU integrating 264 KB of six-bank multi-port SRAM, an execute-in-place (XIP) QSPI flash bus with 16 KB cache, an internal 1.1 V core LDO, and a full-speed USB 1.1 PHY with ROM UF2 bootloader in a compact 7×7 mm QFN-56 package. Two Programmable I/O (PIO) blocks supply 8 cycle-accurate state machines for custom high-speed interfaces alongside flexible crossbar muxing for 2× UART, 2× SPI, 2× I2C, and 16 PWM channels across 30 3.3 V GPIOs. Four 12-bit 500 ksps SAR ADC inputs (GPIO26–GPIO29) handle analog acquisition. GPIO0–GPIO25 are fail-safe 3.3 V digital pads (strictly non-5V-tolerant), whereas GPIO26–GPIO29 incorporate ESD protection clamp diodes to IOVDD.
Pin Assignment Planner
Add the peripherals you need and plan the pin assignments
Full Pin Reference (57 Pins)
| Pin # | Label | Type | Functions | Warnings & Notes |
|---|---|---|---|---|
| 1 | IOVDD | power | 3V3_IO IOVDD |
Digital I/O supply (1.8V–3.3V nominal)
|
| 2 | GPIO0 | digital | GPIO0 SPI0_RX UART0_TX I2C0_SDA PWM0_A PIO0 PIO1 USB_OVCUR_DET |
RP2040 General Purpose I/O pin 0
|
| 3 | GPIO1 | digital | GPIO1 SPI0_CSn UART0_RX I2C0_SCL PWM0_B PIO0 PIO1 USB_VBUS_DET |
RP2040 General Purpose I/O pin 1
|
| 4 | GPIO2 | digital | GPIO2 SPI0_SCK UART0_CTS I2C1_SDA PWM1_A PIO0 PIO1 USB_VBUS_EN |
RP2040 General Purpose I/O pin 2
|
| 5 | GPIO3 | digital | GPIO3 SPI0_TX UART0_RTS I2C1_SCL PWM1_B PIO0 PIO1 USB_OVCUR_DET |
RP2040 General Purpose I/O pin 3
|
| 6 | GPIO4 | digital | GPIO4 SPI0_RX UART1_TX I2C0_SDA PWM2_A PIO0 PIO1 USB_VBUS_DET |
RP2040 General Purpose I/O pin 4
|
| 7 | GPIO5 | digital | GPIO5 SPI0_CSn UART1_RX I2C0_SCL PWM2_B PIO0 PIO1 USB_VBUS_EN |
RP2040 General Purpose I/O pin 5
|
| 8 | GPIO6 | digital | GPIO6 SPI0_SCK UART1_CTS I2C1_SDA PWM3_A PIO0 PIO1 USB_OVCUR_DET |
RP2040 General Purpose I/O pin 6
|
| 9 | GPIO7 | digital | GPIO7 SPI0_TX UART1_RTS I2C1_SCL PWM3_B PIO0 PIO1 USB_VBUS_DET |
RP2040 General Purpose I/O pin 7
|
| 10 | IOVDD | power | 3V3_IO IOVDD |
Digital I/O supply (1.8V–3.3V nominal)
|
| 11 | GPIO8 | digital | GPIO8 SPI1_RX UART1_TX I2C0_SDA PWM4_A PIO0 PIO1 USB_VBUS_EN |
RP2040 General Purpose I/O pin 8
|
| 12 | GPIO9 | digital | GPIO9 SPI1_CSn UART1_RX I2C0_SCL PWM4_B PIO0 PIO1 USB_OVCUR_DET |
RP2040 General Purpose I/O pin 9
|
| 13 | GPIO10 | digital | GPIO10 SPI1_SCK UART1_CTS I2C1_SDA PWM5_A PIO0 PIO1 USB_VBUS_DET |
RP2040 General Purpose I/O pin 10
|
| 14 | GPIO11 | digital | GPIO11 SPI1_TX UART1_RTS I2C1_SCL PWM5_B PIO0 PIO1 USB_VBUS_EN |
RP2040 General Purpose I/O pin 11
|
| 15 | GPIO12 | digital | GPIO12 SPI1_RX UART0_TX I2C0_SDA PWM6_A PIO0 PIO1 USB_OVCUR_DET |
RP2040 General Purpose I/O pin 12
|
| 16 | GPIO13 | digital | GPIO13 SPI1_CSn UART0_RX I2C0_SCL PWM6_B PIO0 PIO1 USB_VBUS_DET |
RP2040 General Purpose I/O pin 13
|
| 17 | GPIO14 | digital | GPIO14 SPI1_SCK UART0_CTS I2C1_SDA PWM7_A PIO0 PIO1 USB_VBUS_EN |
RP2040 General Purpose I/O pin 14
|
| 18 | GPIO15 | digital | GPIO15 SPI1_TX UART0_RTS I2C1_SCL PWM7_B PIO0 PIO1 USB_OVCUR_DET |
RP2040 General Purpose I/O pin 15
|
| 19 | TESTEN | special | TESTEN |
[DANGER] Factory test pin — MUST tie directly to GND
Leaving TESTEN floating or HIGH enters factory test mode and prevents booting.
Factory test enable pin
|
| 20 | XIN | clock | XIN |
[INFO] 12MHz crystal input or 1.8V–3.3V CMOS clock input
12MHz crystal input or 1.8V–3.3V CMOS clock input
Crystal oscillator input
|
| 21 | XOUT | clock | XOUT |
[INFO] 12MHz crystal output (add 1kΩ series damping resistor for typical SMD crystals)
12MHz crystal output (add 1kΩ series damping resistor for typical SMD crystals)
Crystal oscillator output
|
| 22 | IOVDD | power | 3V3_IO IOVDD |
Digital I/O supply (1.8V–3.3V nominal)
|
| 23 | DVDD | power | 1V1_CORE DVDD |
[INFO] 1.1V core logic supply
1.1V core logic supply — decouple with 100nF close to pin
1.1V core logic supply
|
| 24 | SWCLK | digital | SWCLK |
[INFO] Dedicated ARM SWD debug pin
Serial Wire Debug interface pin (SWCLK/SWDIO). Keep reserved when using an external debug probe.
ARM Serial Wire Debug Clock
|
| 25 | SWDIO | digital | SWDIO |
[INFO] Dedicated ARM SWD debug pin
Serial Wire Debug interface pin (SWCLK/SWDIO). Keep reserved when using an external debug probe.
ARM Serial Wire Debug Data I/O
|
| 26 | RUN | reset | RUN |
[INFO] Active-low hardware reset (pull LOW to reset RP2040)
Active-low hardware reset (pull LOW to reset RP2040)
Active-low hardware reset
|
| 27 | GPIO16 | digital | GPIO16 SPI0_RX UART0_TX I2C0_SDA PWM0_A PIO0 PIO1 USB_VBUS_DET |
RP2040 General Purpose I/O pin 16
|
| 28 | GPIO17 | digital | GPIO17 SPI0_CSn UART0_RX I2C0_SCL PWM0_B PIO0 PIO1 USB_VBUS_EN |
RP2040 General Purpose I/O pin 17
|
| 29 | GPIO18 | digital | GPIO18 SPI0_SCK UART0_CTS I2C1_SDA PWM1_A PIO0 PIO1 USB_OVCUR_DET |
RP2040 General Purpose I/O pin 18
|
| 30 | GPIO19 | digital | GPIO19 SPI0_TX UART0_RTS I2C1_SCL PWM1_B PIO0 PIO1 USB_VBUS_DET |
RP2040 General Purpose I/O pin 19
|
| 31 | GPIO20 | digital | GPIO20 SPI0_RX UART1_TX I2C0_SDA PWM2_A PIO0 PIO1 CLOCK_GPIN0 USB_VBUS_EN |
RP2040 General Purpose I/O pin 20
|
| 32 | GPIO21 | digital | GPIO21 SPI0_CSn UART1_RX I2C0_SCL PWM2_B PIO0 PIO1 CLOCK_GPOUT0 USB_OVCUR_DET |
RP2040 General Purpose I/O pin 21
|
| 33 | IOVDD | power | 3V3_IO IOVDD |
Digital I/O supply (1.8V–3.3V nominal)
|
| 34 | GPIO22 | digital | GPIO22 SPI0_SCK UART1_CTS I2C1_SDA PWM3_A PIO0 PIO1 CLOCK_GPIN1 USB_VBUS_DET |
RP2040 General Purpose I/O pin 22
|
| 35 | GPIO23 | digital | GPIO23 SPI0_TX UART1_RTS I2C1_SCL PWM3_B PIO0 PIO1 CLOCK_GPOUT1 USB_VBUS_EN |
RP2040 General Purpose I/O pin 23
|
| 36 | GPIO24 | digital | GPIO24 SPI1_RX UART1_TX I2C0_SDA PWM4_A PIO0 PIO1 CLOCK_GPOUT2 USB_OVCUR_DET |
RP2040 General Purpose I/O pin 24
|
| 37 | GPIO25 | digital | GPIO25 SPI1_CSn UART1_RX I2C0_SCL PWM4_B PIO0 PIO1 CLOCK_GPOUT3 USB_VBUS_DET |
RP2040 General Purpose I/O pin 25
|
| 38 | GPIO26 | mixed | ADC0 GPIO26 SPI1_SCK UART1_CTS I2C1_SDA PWM5_A PIO0 PIO1 USB_VBUS_EN |
[CAUTION] ADC ESD diode to IOVDD & RP2040-E6 input leakage
Unlike GPIO0–25, GPIO26–29 have clamp diodes to IOVDD (do not drive while unpowered). Disable digital input buffer in firmware when sampling ADC (errata RP2040-E6). Strictly 3.3V max.
RP2040 ADC input 0 / GPIO26
|
| 39 | GPIO27 | mixed | ADC1 GPIO27 SPI1_TX UART1_RTS I2C1_SCL PWM5_B PIO0 PIO1 USB_OVCUR_DET |
[CAUTION] ADC ESD diode to IOVDD & RP2040-E6 input leakage
Unlike GPIO0–25, GPIO26–29 have clamp diodes to IOVDD (do not drive while unpowered). Disable digital input buffer in firmware when sampling ADC (errata RP2040-E6). Strictly 3.3V max.
RP2040 ADC input 1 / GPIO27
|
| 40 | GPIO28 | mixed | ADC2 GPIO28 SPI1_RX UART0_TX I2C0_SDA PWM6_A PIO0 PIO1 USB_VBUS_DET |
[CAUTION] ADC ESD diode to IOVDD & RP2040-E6 input leakage
Unlike GPIO0–25, GPIO26–29 have clamp diodes to IOVDD (do not drive while unpowered). Disable digital input buffer in firmware when sampling ADC (errata RP2040-E6). Strictly 3.3V max.
RP2040 ADC input 2 / GPIO28
|
| 41 | GPIO29 | mixed | ADC3 GPIO29 SPI1_CSn UART0_RX I2C0_SCL PWM6_B PIO0 PIO1 USB_VBUS_EN |
[CAUTION] ADC ESD diode to IOVDD & RP2040-E6 input leakage
Unlike GPIO0–25, GPIO26–29 have clamp diodes to IOVDD (do not drive while unpowered). Disable digital input buffer in firmware when sampling ADC (errata RP2040-E6). Strictly 3.3V max.
RP2040 ADC input 3 / GPIO29
|
| 42 | IOVDD | power | 3V3_IO IOVDD |
Digital I/O supply (1.8V–3.3V nominal)
|
| 43 | ADC_AVDD | power | ADC_AVDD |
ADC analog reference & supply (3.3V nominal)
|
| 44 | VREG_IN | power | VREG_IN |
Internal 1.1V core regulator input (1.8V–3.3V, 1µF cap to GND)
|
| 45 | VREG_VOUT | power | VREG_VOUT_1V1 |
[CAUTION] 1.1V regulator output capacitor requirement
1.1V regulator output — requires 1µF capacitor to GND; connect to DVDD
1.1V regulator output — requires 1µF capacitor to GND; connect to DVDD
|
| 46 | USB_DM | special | USB_DM |
[CAUTION] Requires external 27Ω series termination resistor
External 27Ω resistor required in series with USB D- pin to meet USB full-speed termination impedance.
USB full-speed differential D- signal
|
| 47 | USB_DP | special | USB_DP |
[CAUTION] Requires external 27Ω series termination resistor
External 27Ω resistor required in series with USB D+ pin to meet USB full-speed termination impedance.
USB full-speed differential D+ signal
|
| 48 | USB_VDD | power | USB_VDD_3V3 |
USB PHY 3.3V supply
|
| 49 | IOVDD | power | 3V3_IO IOVDD |
Digital I/O supply (1.8V–3.3V nominal)
|
| 50 | DVDD | power | 1V1_CORE DVDD |
[INFO] 1.1V core logic supply
1.1V core logic supply — decouple with 100nF close to pin
1.1V core logic supply
|
| 51 | QSPI_SD3 | digital | QSPI_SD3 |
[CAUTION] Dedicated external XIP QSPI flash bus
Dedicated external XIP QSPI flash bus — cannot be repurposed for user peripherals.
Dedicated QSPI flash interface signal QSPI_SD3
|
| 52 | QSPI_SCLK | digital | QSPI_SCLK |
[CAUTION] Dedicated external XIP QSPI flash bus
Dedicated external XIP QSPI flash bus — cannot be repurposed for user peripherals.
Dedicated QSPI flash interface signal QSPI_SCLK
|
| 53 | QSPI_SD0 | digital | QSPI_SD0 |
[CAUTION] Dedicated external XIP QSPI flash bus
Dedicated external XIP QSPI flash bus — cannot be repurposed for user peripherals.
Dedicated QSPI flash interface signal QSPI_SD0
|
| 54 | QSPI_SD2 | digital | QSPI_SD2 |
[CAUTION] Dedicated external XIP QSPI flash bus
Dedicated external XIP QSPI flash bus — cannot be repurposed for user peripherals.
Dedicated QSPI flash interface signal QSPI_SD2
|
| 55 | QSPI_SD1 | digital | QSPI_SD1 |
[CAUTION] Dedicated external XIP QSPI flash bus
Dedicated external XIP QSPI flash bus — cannot be repurposed for user peripherals.
Dedicated QSPI flash interface signal QSPI_SD1
|
| 56 | QSPI_SS | digital | QSPI_SS |
[CAUTION] Boot strapping pin (BOOTSEL) & QSPI Flash CS#
Sampled at reset: pulling QSPI_SS LOW forces USB UF2 bootloader mode instead of booting from QSPI flash.
QSPI Flash Chip Select / Boot strapping pin (BOOTSEL)
|
| 57 | GND | ground | GND |
Central exposed thermal & electrical ground pad
|