Raspberry Pi Documentation

RP2040

Welcome to RP2040

Welcome to RP2040, a microcontroller designed here at Raspberry Pi.

rp2040

Whether you have a Raspberry Pi Pico or another RP2040-based microcontroller board, everything you need to get started is here. You’ll find support for getting started with C/C++ or MicroPython on Raspberry Pi Pico, and links to resources for other boards that use RP2040. There are also links to the technical documentation for both the Raspberry Pi Pico microcontroller board and our RP2040 microcontroller chip.

Technical Specification

RP2040 is the debut microcontroller from Raspberry Pi. It brings our signature values of high performance, low cost, and ease of use to the microcontroller space.

With a large on-chip memory, symmetric dual-core processor complex, deterministic bus fabric, and rich peripheral set augmented with our unique Programmable I/O (PIO) subsystem, it provides professional users with unrivalled power and flexibility. With detailed documentation, a polished MicroPython port, and a UF2 bootloader in ROM, it has the lowest possible barrier to entry for beginner and hobbyist users.

RP2040 is a stateless device, with support for cached execute-in-place from external QSPI memory. This design decision allows you to choose the appropriate density of non-volatile storage for your application, and to benefit from the low pricing of commodity Flash parts.

RP2040 is manufactured on a modern 40nm process node, delivering high performance, low dynamic power consumption, and low leakage, with a variety of low-power modes to support extended-duration operation on battery power

Key features:

  • Dual ARM Cortex-M0+ @ 133MHz

  • 264kB on-chip SRAM in six independent banks

  • Support for up to 16MB of off-chip Flash memory via dedicated QSPI bus

  • DMA controller

  • Fully-connected AHB crossbar

  • Interpolator and integer divider peripherals

  • On-chip programmable LDO to generate core voltage

  • 2 on-chip PLLs to generate USB and core clocks

  • 30 GPIO pins, 4 of which can be used as analogue inputs

  • Peripherals

    • 2 UARTs

    • 2 SPI controllers

    • 2 I2C controllers

    • 16 PWM channels

    • USB 1.1 controller and PHY, with host and device support

    • 8 PIO state machines

Why is the chip called RP2040?

The post-fix numeral on RP2040 comes from the following,

rp2040 explanation
  1. Number of processor cores (2)

  2. Loosely which type of processor (M0+)

  3. floor(log2(ram / 16k))

  4. floor(log2(nonvolatile / 16k)) or 0 if no onboard nonvolatile storage

Design Files

Internal Temperature Sensor

The internal temperature sensor in the RP2040 package is a low-resolution sensor that needs to be user-calibrated to be useful to any degree of accuracy.

A crucial part of accurately determining the temperature measured is knowing the ADC VREF voltage. The conversion formula means that small errors in the ADC VREF voltage can give quite large discrepancies in temperature calculated. The RP2040 doesn’t have an internal Fixed Voltage Reference which can be used to determine VREF voltage so VREF voltage needs to be measured manually - with the caveat it could change - or an external Fixed Voltage Reference needs to be provided.

Note
The RP2040 sensor voltage falls as temperature rises.

See Chapter 4, section 4.9.5 of the RP2040 Datasheet for further details of the internal temperature sensor.

Documentation

Documentation for Raspberry Pi Pico and other RP2040-based boards.

RP2040 Device

RP2040 Datasheet

A microcontroller by Raspberry Pi

Hardware design with RP2040

Using RP2040 microcontrollers to build boards and products

Raspberry Pi Pico

Raspberry Pi Pico Datasheet

An RP2040-based microcontroller board

Getting started with Raspberry Pi Pico

C/C++ development with Raspberry Pi Pico and other RP2040-based microcontroller boards

Note
While it is not officially supported there is a Pico Setup for Windows installation tool which automates installation of the C/C++ SDK on Windows 10.

Raspberry Pi Pico W

Raspberry Pi Pico W Datasheet

An RP2040-based microcontroller board with wireless

Connecting to the Internet with Raspberry Pi Pico W

Getting Raspberry Pi Pico W online with C/C++ or MicroPython

Software Development

Raspberry Pi Pico C/C++ SDK

Libraries and tools for C/C++ development on RP2040 microcontrollers

Raspberry Pi Pico Python SDK

A MicroPython environment for RP2040 microcontrollers

The API level Doxygen documentation for the Raspberry Pi Pico C/C++ SDK is also available as a micro-site.

RP2040-based Boards

Designed by Raspberry Pi as a both a development board, and as a reference design, the Raspberry Pi Pico series is a family of RP2040-based boards. The Pico family currently consists of Raspberry Pi Pico (far left), Pico H (left), and Pico W (right), and Pico WH (far right).

pico family

The design files for Raspberry Pi Pico and Pico W are available openly, with no limitations.

  • Download Design Files for Raspberry Pi Pico (Cadence Allegro)

  • Download Design Files for Raspberry Pi Pico W (Cadence Allegro)

Permission to use, copy, modify, and/or distribute this design for any purpose with or without fee is hereby granted.

THE DESIGN IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS DESIGN INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS DESIGN.

Other Boards

Discussions around other third party RP2040-based boards can be found on the Raspberry Pi forums.