Raspberry Pi RP2040: Our Microcontroller for the Masses
Raspberry Pi COO James Adams talks us through the company's first custom Arm chip, designed in-house with Arm Flexible Access and now at the heart of the Raspberry Pi Pico
By James Adams, COO and Director of Hardware, Raspberry Pi
Designing a sub-$5 computer involves several tough decisions. Decisions such as which instruction set architecture (ISA) to use and which class of chip IP to select from within that ecosystem in order to balance price, power and performance. Then there are design and manufacturing questions: who’s going to design the system on chip (SoC) and who’s going to fabricate it?
All of these considerations dictate how useful and affordable your final product is. So when it came to selecting a chip to power our first microcontroller-class product, Raspberry Pi Pico, we knew that we needed to push that price-performance ratio harder than ever before.
RP2040: The beating heart of the Raspberry Pi Pico
The result of that pushing is the Raspberry Pi RP2040 SoC, a surprisingly powerful yet radically low-cost microcontroller packing dual Arm Cortex-M0+ processors, the most energy-efficient Arm processor available. We designed the RP2040 SoC to give maximum performance in the lowest power: even at peak performance, the RP2040 SoC sips energy. And when idle, it consumes much less than a milliwatt—that’s crucially low power consumption for deeply embedded applications, enabling long-duration operation with relatively small batteries.
As the RP2040 SoC is based on a high-clocked dual Cortex-M0+, it’s also a remarkably good platform for endpoint AI, or more specifically TinyML. The TensorFlow Lite Micro library has already been ported to the RP2040, enabling users to run machine learning (ML) models to do sensor-based analysis such as voice and image recognition and accelerometer-based gesture recognition.
Meanwhile, the chip’s low cost opens the door to ubiquity: for example, an RP2040 SoC in every light switch in your home, not only reacting to basic on/off commands but taking information from sensors and performing on-chip ML to intelligently adjust light levels based on time of day or occupancy.
Connecting digital and physical worlds with RP2040 SoC
That’s just one use case out of many we expect the RP2040 SoC to enable: we imagine use cases in applications ranging from standalone toys to networked Internet of things (IoT) devices monitoring industrial oil pipelines.
But those familiar with Raspberry Pi might wonder what prompted this move into microcontrollers after 8 years of designing products capable of running a general-purpose operating system (OS) like Linux.
To answer that, we need to consider that many current applications for Pi connect it to the physical world—bridging software and hardware, reading sensors and driving actuators. We’ve seen Pi used to monitor sensors on the International Space Station (ISS), or sort cucumbers in Japan. These esoteric applications demonstrate the breadth of Pi’s capability, yet Raspberry Pi does not support analogue input directly—and software running under a general-purpose OS is not well suited to low-latency control of individual input/output (I/O) pins.
This is not something we ever felt the need to address in
our core products because there are so many accessories available to provide
analogue I/O if you need it. But consider that even in its lowest power mode, a
Raspberry Pi Zero will consume on the order of 100 milliwatts. This power
requirement becomes a clear barrier for users wanting to use Raspberry Pi for ultra-low-power
Internet of things (IoT) and embedded applications with milliwatt consumption
measured in single digits.
Flexible I/O enables Raspberry Pi Pico to talk to almost any
That’s what the RP2040 SoC is designed to achieve: surprisingly good performance, ultra-low power consumption and flexible, reliable I/O. The low latency of peripheral access via the Cortex-M0+ SIO bus offers deterministic and reliable interaction with external devices. By combining Cortex-M0+ with our patent-pending PIO subsystem, we’re able to talk to almost any external interface standard via ‘bit banging’ (using software and programmable hardware as a substitute for dedicated hardware). As this is a dual Cortex-M0+ chip, it’s entirely possible to have one processor dedicated to bit banging, and the other dedicated to application code.
A week since launch, we’re already seeing some fantastic
examples of bit banging using the RP2040’s I/O. One Raspberry Pi enthusiast,
Graham Sanderson, built an entire BBC Micro emulator within a week of launch,
using PIO to emulate VGA graphics output and audio via the Raspberry Pi Pico’s I/O
It strikes me as entirely fitting that the BBC Micro—the
$500 educational computer that played such a pivotal role in the creation of
Arm—can now be brought back to life on a $4 Arm-powered board.
Delivering our first in-house
silicon with Arm Flexible Access
Since launch, Raspberry Pi has been powered by Broadcom chips based on Arm’s Cortex-A application processors. But Raspberry Pi Pico required a class of processor drawing significantly less power than the smartphone-class chips found in our base Raspberry Pi models. Arm’s Cortex-M microcontrollers were the obvious choice—but which model, and from which semiconductor vendor?
We came to a decision early on: this would be our first silicon chip designed in-house as opposed to using discrete, off-the-shelf components. This meant using Arm’s base Cortex-M register-transfer level (RTL) design to build our own custom SoC.
Creating the RP2040 SoC from scratch was the only way we could achieve our aims for a chip that did exactly what we needed in terms of performance and flexible I/O while reducing costs, power consumption and printed circuit board (PCB) area.
Yet when it came to choosing which base Arm intellectual
property (IP) blocks to build upon, the decision was less cut-and-dried. Traditionally,
we would have had to pick this IP based on datasheets and then run with that
through to tape-out in the hope that we’d made the right choice.
But then, during our initial development, Arm launched Arm Flexible
Access: giving us up-front, low-cost access to a wide range of Arm IP, support,
tools, and training. We jumped at the chance to design our own custom SoC with
Arm Flexible Access—and were one of the first companies to tape-out through the
program. Being able to audition different Cortex-M processors before deciding
which to go with was simply a far better match for how engineering actually
Our first RP2040-based board, the Raspberry Pi Pico, comes in at $4 but the RP2040 SoC itself costs a fraction of that. Education, and being able to deliver boards at a price point that is realistic to young people, is fundamental to the Raspberry Pi mission—so it’s great to see a number of our partners delivering RP2040-based development boards designed for easy and fun expansion and experimentation. These include the Adafruit ItsyBitsy RP2040, a tiny board featuring an RGB color NeoPixel, and the Pimoroni Pico Explorer Base with its built-in breakout board.
There are some excellent hardware implementations designed
for deeply embedded applications, too. The Arduino Nano RP2040 Connect combines
the power of RP2040 with built-in IMU and audio sensors, WiFi and Bluetooth connectivity
and a crypto chip for secure IoT applications.
With the RP2040 and Raspberry Pi Pico, it’s never been easier for those new to the Raspberry Pi and Arm ecosystems to get started and build something that augments their world in new and unique ways. We can’t wait to see what you do with it.
Get started with the RP2040 and Raspberry Pi Pico today
Raspberry Pi Pico is a tiny, fast, and versatile board built using RP2040, a brand-new Arm Cortex-M microcontroller chip designed by Raspberry Pi. Buy it now for $4 and begin your journey to developing on Arm.
Day one of #MWC24 showed us how sustainable mobile networks can fuel the growth of AI to deliver unparalleled user experiences.
We're pleased to work closely with our partner ecosystem to build this future #onArm Neoverse. Here's how: https://newsroom.arm.com/sustainable-cloud-infrastructure?utm_source=twitter&utm_medium=social-organic&utm_content=blog&utm_campaign=mk19_events_na_2023
We're joining forces with tech leaders and academic institutions as a member of the AI-RAN Alliance, announced today at #MWC24.🙌
Tying research together with testing and implementation, we'll explore how to use AI to advance RAN technology for 5G and 6G: https://ai-ran.org/news/industry-leaders-in-ai-and-wireless-form-ai-ran-alliance/