Raspberry Silicon: Introducing the Raspberry Pi RP2040 MCU and the Pico Board
on
The Raspberry Pi Pico board announced today is not yet another slightly different Raspberry Pi board. No, the Raspberry Pi Pico is a microcontroller module based on, and this is the big news, an RP2040 microcontroller. Why is this big news? Because this microcontroller was designed by Raspberry Pi!
Say What?
Why design your own microcontroller instead of picking one from the huge pool of existing ones? Well, according to Raspberry Pi, none of the products available in the market met their price/performance goals. Also, it allowed them to incorporate several innovative and powerful features not available elsewhere at any price. And finally, developing their own microcontroller has given them the opportunity to create a software stack and documentation set which is up to the high standards they have set themselves with the “core” Raspberry Pi products.
The RP2040
The Raspberry Pi RP2040 microcontroller contains two ARM Cortex-M0+ cores clocked at 133 MHz together with 264 KB of RAM. Program memory is external and up to 16 MB is supported. The device has everything you expect from a modern microcontroller like UARTS, SPI and I2C ports, and there are timers, PWM, DMA and a 12-bit analogue-to-digital converter (ADC). However, it does have some extra features that set the RP2040 apart, like its two PIO blocks.
PIO Blocks?
PIO stands for programmable input/output and it offers a versatile hardware interface that can support a variety of I/O standards. Each PIO block contains four programmable state machines that can be viewed, in a way, as tiny microcontrollers. To stay in line with the Raspberry Pi naming scheme, we could refer to them as picocontrollers. Their in- and outputs can be connected to any GPIO pin and they can be reconfigured on-the-fly.
Built-in Libraries
Other features that improve performance are built-in libraries for single-precision floating-point calculations, fast bit manipulations and memory move and copy functions.
According to Raspberry Pi, the RP2040 should be able to compete with ARM-Cortex-M4-based devices.
The Raspberry Pi Pico Board
The Raspberry Pi Pico is the first microcontroller board based on the RP2040. It looks a lot like other microcontroller boards with the MCU in the centre, a micro-USB connector on one end and a row of contacts along each side. A 3-pin debug connector is available at the other end of the board.
The RPico measures 51 by 21 mm, which is the exact same size as an ESP32 Pico Kit (what’s in a name?), it is slightly larger than an Arduino Nano or Micro (again, what’s in a name?) and a bit smaller than an Arduino MKRZero, which is also based on an ARM Cortex-M0+ device, but single-core.
Pricewise the RPico is very well situated as it retails for around five euros, similar to the STM32 BluePill board, which has an ARM Cortex-M3 MCU on it. The RPico comes with 2 MB of QSPI Flash memory and 25 of the 30 GPIO pins of the RP2040 have been brought out on the extension connectors.
A Convenient & Complete Development System
To create applications for the RP2040 and the Pico board in C, C++ or assembly language you must install the SDK. With it you can build anything from simple LED blinky programs up to full-fledged runtime environments such as e.g. MicroPython (see below).
A library of predefined PIO functions is included in the SDK, but you can, of course, also build your own. As several of these pre-built blocks concern graphical applications like LED-string and display drivers, we may expect to see the RP2040 pop up in multimedia applications. As a matter of fact, one of the demo applications for the Pico board is a VGA movie player where the RP2040’s PIO blocks generate the video signal in real time.The SDK runs, of course, on a Raspberry PI (but not only). With it you can create applications in a Visual Studio Code integrated development environment (IDE). The Pico board itself can either be connected to a USB port for drag-‘n’-drop programming or to the RPi’s 40-pin extension connector to use GDB and OpenOCD over SWD. All very convenient and well documented.
MicroPython
For those who prefer programming in Python, there is MicroPython, which has been ported to the RPico (including multicore support). Because MicroPython is very much like normal Python, the RPico board can, in theory, run Python applications that were developed for another Raspberry Pi board.
Wrapping up
The Raspberry Pi Pico will probably be a tough competitor for Arduino and similar platforms as it is cheaper and features debugging. Maybe an RP2040-based Arduino board will appear soon?Raspberry Pi’s original goal was to make computing accessible to everyone. With the RP2040 and the Pico board they try to do the same for microcontrollers. Whatever happens next, they sure have done an amazing job so far!
Want one? Click here!
Discussion (9 comments)