0% found this document useful (0 votes)
68 views20 pages

Raspberry Pi Documentation - RP2040

Uploaded by

h- bar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views20 pages

Raspberry Pi Documentation - RP2040

Uploaded by

h- bar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

RP2040

Welcome to RP2040
Edit this on GitHub

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

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
Edit this on GitHub

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.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 1/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

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

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 2/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

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,

RP 2 0 4 0
floor(log2(nonvolatile / 16k))

floor(log2(ram / 16k))

Type of core (e.g. M0+)

Number of cores

Raspberry Pi

1. Number of processor cores (2)

2. Loosely which type of processor (M0+)

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

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 3/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

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

Design Files
Download Minimal Viable Board Design Files (KiCAD)

Download VGA Carrier Board Design Files (KiCAD)

Internal Temperature Sensor


Edit this on GitHub

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
Edit this on GitHub

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 4/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

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.

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

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 5/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

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

NOTE

If you are building applications with the C/C++ SDK and targeting boards other than the Raspberry Pi
Pico, you will need to pass -DPICO_BOARD=boardname to CMake. Here boardname is the name of your board,
e.g. for the Adafruit Feather RP2040 you should pass -DPICO_BOARD=adafruit_feather_rp2040. See the
boards/ directory in the Raspberry Pi Pico SDK, and the forums, for more information.

RP2040-based Boards
Edit this on GitHub

An incomplete list of boards using RP2040.

Boards from Raspberry Pi

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 6/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Raspberry Pi Pico
Designed by Raspberry Pi, RP2040 features a dual-core Arm Cortex-M0+ processor with 264KB
internal RAM and support for up to 16MB of off-chip Flash. A wide range of flexible I/O options
includes I2C, SPI, and — uniquely — Programmable I/O (PIO). These support endless possible
applications for this small and affordable package.

Boards from Adafruit

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 7/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Feather 2040
A new chip means a new Feather, and the Raspberry Pi RP2040 is no exception. When we saw
this chip we thought "this chip is going to be awesome when we give it the Feather Treatment"
and so we did! This Feather features the RP2040, and all niceties you know and love about
Feather.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 8/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Itsy Bitsy 2040


A new chip means a new ItsyBitsy, and the Raspberry Pi RP2040 is no exception. When we saw
this chip we thought "this chip is going to be awesome when we give it the ItsyBitsy teensy-
weensy Treatment" and so we did! This Itsy' features the RP2040, and all niceties you know and
love about the ItsyBitsy family.

Boards from Arduino

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 9/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Nano RP2040 Connect


Meet the only connected RP2040 board, leveraging essential key features of the other Arduino
Nanos — like the versatile u-blox NINA WiFi and Bluetooth module. The new board comes packed
with some high-quality MEMS sensors from STM, an efficient power section, and a bunch of other
innovations.

Boards from Pimoroni

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 10/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

PGA2040
A minimal RP2040 breakout board wrangled into a Pin Grid Array, with a maximal dash of retraux
style. PGA2040 has no USB port, LED or buttons but it does have an embed-friendly 21mm
square footprint, 8MB of flash and lots of exposed RP2040 pins to play with.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 11/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Peak LiPo
A top of the line Pirate-brand RP2040-powered microcontroller with all the extras - lots of flash
memory, USB-C, STEMMA QT/Qwiic, debug connectors, and onboard LiPo charging. Pimoroni
Pico boards add extra functionality whilst keeping to the Pico footprint, ensuring compatibility
with existing Pico addons.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 12/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Tiny 2040
A postage stamp sized RP2040 development board with a USB-C connection, perfect for portable
projects, wearables, and embedding into devices. Tiny 2040 comes with 8MB of QSPI (XiP) flash
on board so it can handle projects small and large with ease.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 13/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Keybow 2040
A luxe 16 key USB-C keyboard with tactile mechanical switches and fully customisable RGB
lighting, ideal for custom macro pads, midi controllers and stream decks. RP2040 gives Keybow
2040 low latency input, zero boot time and a new, compact footprint.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 14/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

PicoSystem
An all-in-one pocket sized games console with RP2040 at its heart, ready for filling up with all the
most fun pixels! PicoSystem has a nice tactile joypad and buttons, a vibrant 240x240 screen and
a lipo battery, neatly wrapped up in some shiny abstract PCB art.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 15/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Plasma 2040
Swathe everything in rainbows with this all-in-one, USB-C powered controller for
WS2812/Neopixel and APA102/Dotstar addressable LED strips, with RP2040 in the driving seat -
just perfect for whipping up some custom mood lighting.

Boards from SparkFun

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 16/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Pro Micro - RP2040


The SparkFun Pro Micro RP2040 is a low-cost, high performance board with flexible digital
interfaces featuring the RP2040 microcontroller. The board also includes a WS2812B addressable
LED, boot button, reset button, USB-C, resettable PTC fuse, castellated pads, and a Qwiic
connector to add devices from SparkFun’s quick-connect I2C ecosystem.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 17/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Thing Plus - RP2040


The SparkFun Thing Plus - RP2040 harnesses the capability of RP2040 on a compact
development board. Within the Feather-compatible Thing Plus form factor with 18 GPIO pins, the
board offers an SD card slot, 16MB flash memory, a JST single-cell battery connector, an
addressable WS2812 RGB LED, JTAG PTH pins, mounting holes, and SparkFun’s signature Qwiic
connector.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 18/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

MicroMod RP2040 Processor


The SparkFun MicroMod Pi RP2040 Processor Board is part of SparkFun’s MicroMod modular
interface system. The MicroMod M.2 connector makes it a breeze to connect your MicroMod Pi
RP2040 Processor with the MicroMod carrier board that gives you the inputs and outputs you
need for your project.

Other Boards
Discussions around other RP2040-based boards can be found on the forums.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 19/20
08:48, 26/03/2022 Raspberry Pi Documentation - RP2040

Raspberry Pi documentation is copyright © 2012-2022 Raspberry Pi Ltd and is licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-
SA) licence.
Some content originates from the eLinux wiki, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported licence.

https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html 20/20

You might also like