cuprio

Designing a PCB with the RP2040

The RP2040 is Raspberry Pi's dual-core Arm Cortex-M0+ microcontroller with 264 kB of SRAM, 30 GPIOs and a full-speed USB controller. It has no internal flash, so every board needs an external QSPI flash chip, and it makes its own 1.1 V core supply with an on-chip regulator. A working design is a 3.3 V supply, decoupling, a 12 MHz crystal, the flash, two USB resistors and a way to enter BOOTSEL mode.

  • 3 min read
  • 6 sections
  • 2 sources
CPU
Dual Arm Cortex-M0+, up to 133 MHz (200 MHz at 1.15 V core)
SRAM
264 kB in six banks
Flash
None on chip; external QSPI flash up to 16 MB
Supply
IOVDD 1.62 to 3.63 V; 1.1 V core from internal LDO; USB_VDD 3.135 to 3.63 V
USB
USB 1.1 controller and PHY: full-speed device, full/low-speed host
GPIO
30, of which 4 can be ADC inputs
Package
QFN-56, 7×7 mm, 0.4 mm pitch
Board plans in Cuprio using it
4 (as of 27 November 2026)

How do you power and decouple the RP2040?

The chip needs 3.3 V for IOVDD, USB_VDD, ADC_AVDD and VREG_VIN, and 1.1 V for the digital core (DVDD). The core supply comes from the internal LDO: connect VREG_OUT to the DVDD pins and place a 1 µF capacitor close to both VREG_IN and VREG_OUT. Raspberry Pi's minimal design powers the board from USB VBUS through an NCP1117 3.3 V regulator with 10 µF on its input and output.

The general rule is one 100 nF decoupling capacitor per power pin, placed close to the pin. On a two-layer board with parts on one side, the reference design shares one capacitor between pins 48 and 49 to leave room for routing; that trade-off is acceptable for most designs, while a four-layer board with parts on both sides gives room for the full set.

Do I need a crystal for the RP2040?

The internal ring oscillator varies from chip to chip and with voltage and temperature, so anything that needs an exact frequency needs an external source, and the USB bootloader requires 12 MHz. Raspberry Pi recommends the Abracon ABM8-272-T3: 12 MHz, ±30 ppm, 10 pF load and 50 Ω maximum ESR.

The reference circuit uses two 15 pF load capacitors (7.5 pF in series, plus about 3 pF of stray capacitance, giving about 10.5 pF) and a 1 kΩ series resistor that keeps the crystal from being overdriven at 3.3 V IOVDD. A different crystal or IO voltage means retuning and testing across temperature. Keep the crystal traces short, because their capacitance adds to the load.

Flash, BOOTSEL and reset

  • Wire the QSPI pins straight to the flash with short traces. The reference uses a W25Q128JVS (16 MB), the largest size the RP2040 supports; any 25-series flash that answers the 03h read command with 24-bit addressing can boot.
  • QSPI_SS doubles as the boot strap: if it reads low at boot the chip enters BOOTSEL mode and appears as a USB mass storage device. Pull it low through a 1 kΩ resistor from a button or jumper so the chip can still drive the pin once it starts.
  • Leave a footprint for a 10 kΩ pull-up from QSPI_SS to 3.3 V; some flash parts need chip-select high during power-up.
  • RUN is the active-low reset. Tie it to IOVDD if no reset is needed, or add a button to ground so BOOTSEL can be entered without unplugging.
  • Bring SWCLK and SWDIO to a header for debugging.

USB on the RP2040

USB_DP and USB_DM need a 27 Ω series resistor each, close to the chip; the pull-ups and pull-downs are built in. Route them as a 90 Ω differential pair over solid, unbroken ground. The reference board is 1 mm thick for that reason: on 1.6 mm two-layer boards the same traces sit further from ground and the impedance rises. Full speed is forgiving, but such a board may not meet the USB specification. Add ESD protection at the connector on products that will be plugged in often.

Common mistakes

  • Leaving out the 1 µF on VREG_IN or VREG_OUT, or not linking VREG_OUT to DVDD.
  • A BOOTSEL button that pulls QSPI_SS straight to ground with no series resistor.
  • Long or via-heavy crystal traces, or a crystal swapped for an untested part.
  • Missing 27 Ω USB resistors, or USB traces crossing a gap in the ground plane.
  • Choosing flash larger than 16 MB or one that does not respond to the bootrom's probe sequence.

From schematic to board

The QFN-56 has a 0.4 mm pitch and is hard to solder by hand, so plan for machine assembly. Cuprio picks real parts with live stock and exports KiCad files, Gerbers, drill files, BOM and pick-and-place; see how Cuprio designs a board.

Sources

  1. Raspberry Pi: RP2040 Datasheet

    Cores and clock, SRAM, flash size, GPIO and ADC count, USB, package, supply ranges, 27 Ω USB resistors, RUN pin, 12 MHz for the bootloader

    datasheets.raspberrypi.com
  2. Raspberry Pi: Hardware design with RP2040

    Decoupling, internal regulator capacitors, crystal and load capacitors, 1 kΩ damping resistor, flash and BOOTSEL circuit, USB routing and board thickness

    datasheets.raspberrypi.com
Close view of the two-wheel robot controller, a board designed in Cuprio

Be first in when we open.

Start with 600 welcome credits and get 30% off your first 12 months.