RP2040
MicrocontrollerThe RP2040 is a microcontroller from Raspberry Pi. View the full RP2040 datasheet below including key specifications, pinout.
Key Specifications
| Parameter | Value |
|---|---|
| CPU Cores | Dual ARM Cortex-M0+ |
| GPIO Pins | 30 (4 with ADC) |
| On-Chip SRAM | 264 kB |
| PWM Channels | 16 |
| USB Interface | USB 1.1 (Host/Device) |
| I2C Interfaces | 2 |
| SPI Interfaces | 2 |
| UART Interfaces | 2 |
| PIO State Machines | 8 |
| Package Dimensions | 7 mm x 7 mm |
| CPU Clock Frequency | 133 MHz |
| Off-Chip Flash Support | Up to 16 MB |
| GPIO Supply Voltage (IOVDD) | 1.8V to 3.3V |
| ADC Supply Voltage (ADC AVDD) | 3.3V |
| USB PHY Supply Voltage (USB VDD) | 3.3V |
| Digital Core Supply Voltage (DVDD) | 1.1V |
| Core Regulator Input Voltage (VREG VIN) | 1.8V to 3.3V |
| Core Regulator Output Current (VREG VOUT) | 100 mA max |
| Core Regulator Output Voltage (VREG VOUT) | 1.1V |
Overview
Part: Raspberry Pi RP2040
Type: Microcontroller
Description: The RP2040 is a dual ARM Cortex-M0+ microcontroller operating at up to 133 MHz, featuring 264kB on-chip SRAM, support for up to 16MB off-chip Flash, and a rich peripheral set including 30 GPIOs, 2x UART, 2x SPI, 2x I2C, 16x PWM, 8x PIO state machines, and USB 1.1.
Operating Conditions:
- Supply voltage: 1.8–3.3 V
- Operating temperature: null
- Max clock frequency: 133 MHz
Absolute Maximum Ratings:
- Max supply voltage: null
- Max continuous current: null
- Max junction/storage temperature: null
Key Specs:
- CPU: Dual ARM Cortex-M0+ @ 133 MHz
- On-chip SRAM: 264kB in six independent banks
- Off-chip Flash memory support: Up to 16MB via dedicated QSPI bus
- GPIO pins: 30 (four can be used as analogue inputs)
- Communication Peripherals: 2 × UARTs, 2 × SPI controllers, 2 × I2C controllers
- PWM channels: 16
- PIO state machines: 8
- USB: 1.1 controller and PHY, with host and device support
Features:
- DMA controller
- Fully connected AHB crossbar
- Interpolator and integer divider peripherals
- On-chip programmable LDO to generate core voltage
- Two on-chip PLLs to generate USB and core clocks
- UF2 bootloader in ROM
- Polished MicroPython port
Applications:
- Machine learning
- Motor control
- Agriculture
- Audio
Package:
- 7 × 7 mm QFN-56 package
Features
CPU:
Dual ARM Cortex-M0+ @ 133 MHz
Memory:
264kB on-chip SRAM in six independent banks Support for up to 16MB of off-chip Flash memory via dedicated QSPI bus
Architecture:
DMA controller
Fully connected AHB crossbar Interpolator and integer divider peripherals On-chip programmable LDO to generate core voltage Two on-chip PLLs to generate USB and core clocks
Interfacing:
30 GPIO pins, four of which can be used as analogue inputs
Peripherals:
2 × UARTs 2 × SPI controllers 2 × I2C controllers 16 × PWM channels 8 × PIO state machines
1 × USB 1.1 controller and PHY, with host and device support
Package:
7 × 7 mm QFN-56 package
Product lifetime:
Raspberry Pi understands the value to customers of long term availability of product and therefore aims to continue supply for as long as practically possible. We expect RP2040 to remain in production until at least January 2041.
Compliance:
RP2040 is compliant to Moisture Sensitivity Level 1. RP2040 is compliant to the requirement of REACH Substances of Very High Concern (SVHC) that ECHA announced on 25 June 2020.
RP2040 is compliant to the requirement and standard of Controlled Environment-related Substance of RoHS directive (EU) 2011/65/EU and directive (EU) 2015/863.
Full details can be found in the RP2040 datasheet.
Pin Configuration
RP2040 QFN-56 Pinout
| Pin Number | Pin Name | Type | Description |
|---|---|---|---|
| 1 | IOVDD | P | I/O Supply Voltage |
| 2 | GPIO0 | I/O | General Purpose I/O 0 |
| 3 | GPIO1 | I/O | General Purpose I/O 1 |
| 4 | GPIO2 | I/O | General Purpose I/O 2 |
| 5 | GPIO3 | I/O | General Purpose I/O 3 |
| 6 | GPIO4 | I/O | General Purpose I/O 4 |
| 7 | GPIO5 | I/O | General Purpose I/O 5 |
| 8 | GPIO6 | I/O | General Purpose I/O 6 |
| 9 | GPIO7 | I/O | General Purpose I/O 7 |
| 10 | IOVDD | P | I/O Supply Voltage |
| 11 | GPIO8 | I/O | General Purpose I/O 8 |
| 12 | GPIO9 | I/O | General Purpose I/O 9 |
| 13 | GPIO10 | I/O | General Purpose I/O 10 |
| 14 | GPIO11 | I/O | General Purpose I/O 11 |
| 15 | GPIO12 | I/O | General Purpose I/O 12 |
| 16 | GPIO13 | I/O | General Purpose I/O 13 |
| 17 | GPIO14 | I/O | General Purpose I/O 14 |
| 18 | GPIO15 | I/O | General Purpose I/O 15 |
| 19 | TESTEN | I | Test Enable |
| 20 | XOUT | O | Crystal Oscillator Output |
| 21 | XIN | I | Crystal Oscillator Input |
| 22 | DVDD | P | Core Supply Voltage |
| 23 | DVDD | P | Core Supply Voltage |
| 24 | GND | S | Ground |
| 25 | GND | S | Ground |
| 26 | SWCLK | I/O | SWD Clock |
| 27 | SWDIO | I/O | SWD Data I/O |
| 28 | RUN | I | Run Control |
| 29 | GPIO18 | I/O | General Purpose I/O 18 |
| 30 | GPIO19 | I/O | General Purpose I/O 19 |
| 31 | GPIO20 | I/O | General Purpose I/O 20 |
| 32 | GPIO21 | I/O | General Purpose I/O 21 |
| 33 | IOVDD | P | I/O Supply Voltage |
| 34 | GPIO22 | I/O | General Purpose I/O 22 |
| 35 | GPIO23 | I/O | General Purpose I/O 23 |
| 36 | GPIO24 | I/O | General Purpose I/O 24 |
| 37 | GPIO25 | I/O | General Purpose I/O 25 |
| 38 | GPIO26/ADC0 | I/O | General Purpose I/O 26 / ADC Channel 0 |
| 39 | GPIO27/ADC1 | I/O | General Purpose I/O 27 / ADC Channel 1 |
| 40 | GPIO28/ADC2 | I/O | General Purpose I/O 28 / ADC Channel 2 |
| 41 | GPIO29/ADC3 | I/O | General Purpose I/O 29 / ADC Channel 3 |
| 42 | IOVDD | P | I/O Supply Voltage |
| 43 | VREF | P | ADC Reference Voltage |
| 44 | VREG_OUT | P | Voltage Regulator Output |
| 45 | VREG_IN | P | Voltage Regulator Input |
| 46 | USB_DM | I/O | USB Data Minus |
| 47 | USB_DP | I/O | USB Data Plus |
| 48 | VBUS | P | USB Bus Voltage |
| 49 | VBUS | P | USB Bus Voltage |
| 50 | GND | S | Ground |
| 51 | GND | S | Ground |
| 52 | GND | S | Ground |
| 53 | GND | S | Ground |
| 54 | GND | S | Ground |
| 55 | GND | S | Ground |
| 56 | GND | S | Ground |
Notes
- Power pins: IOVDD (pins 1, 10, 33, 42), DVDD (pins 22, 23), VBUS (pins 48, 49), VREG_IN (pin 45), VREG_OUT (pin 44), VREF (pin 43)
- Ground pins: GND (pins 24, 25, 50–56)
- ADC pins: GPIO26–GPIO29 (pins 38–41) have dual function as ADC channels 0–3
- Debug pins: SWCLK (pin 26) and SWDIO (pin 27) support SWD protocol
- USB pins: USB_DP (pin 47), USB_DM (pin 46), VBUS (pins 48, 49)
- Crystal pins: XIN (pin 21), XOUT (pin 20) for external oscillator
- Control pins: RUN (pin 28) for chip enable, TESTEN (pin 19) for test mode
Get structured datasheet data via API
Get started free