Microcontroller chips
Raspberry Pi designs its own microcontrollers, which are standalone silicon chips for small embedded projects that provide real-time hardware control. These chips are used in Raspberry Pi Pico boards and can be used in third-party microcontroller boards. For more information about Raspberry Pi Pico, see Pico microcontroller boards.
Raspberry Pi microcontrollers can be programmed using:
-
C or C++, which are performance focussed and provide full control over hardware.
-
MicroPython, which provides simpler scripting for rapid development.
For more information on developing with RP2040 or RP2350, see the C/C++ SDK and MicroPython documentation.
Microcontroller overview
Edit this on GitHub
Raspberry Pi microcontrollers are silicon chips that handle specific, real-time tasks, like controlling motors or reading sensors, in embedded systems. Raspberry Pi offers two microcontrollers:
-
RP2040 is the original, general-purpose, dual-core Raspberry Pi microcontroller: a simple, cost-effective microcontroller unit (MCU).
-
RP2350 is a high-performance, dual-core microcontroller for applications with flexible hardware control; it’s a more powerful MCU with advanced features, memory, and security. RP2350 has four variants, described in RP2350 variants.
Key features
Both RP2040 and RP2350 share the following core features:
-
Dual-core processors for parallel processing.
-
On-chip SRAM for real-time workloads.
-
Deterministic bus fabric through a multi-master AHB crossbar that connects the CPUs, DMA, and peripherals to multi-bank SRAM.
-
Built-in USB controller and PHY that allows the microcontroller to act as either a USB device or USB host.
-
Flexible general-purpose I/O (GPIO) that can be configured for digital input/output or assigned to peripheral functions like UART, SPI, I2C, or PWM.
-
Programmable I/O (PIO), a unique feature of Raspberry Pi microcontrollers that provides extended peripheral support.
-
Built-in hardware peripherals for interfaces such as UART, SPI, I2C, PWM, and so on, reducing software overhead and improving efficiency.
-
High performance, low power consumption, and low power leakage as a result of the modern 40 nm manufacturing process for microcontrollers.
-
Low-power modes to support extended-duration operation on battery power.
-
Programming options with C/C++ SDK or MicroPython; you can run Python through the MicroPython port and program it using the UF2 bootloader built into ROM for drag-and-drop programming.
Feature comparison
The following table provides a comparison between RP2040 and RP2350 microcontrollers. For more details about each microcontroller’s features, see the dedicated sections for RP2040 and RP2350.
| Feature | RP2040 | RP2350 |
|---|---|---|
Type |
General-purpose MCU |
High-performance MCU |
Processor core |
Dual-core Arm Cortex-M0+ |
Dual-core Arm Cortex-M33 (higher performance, TrustZone support) or Hazard3 (RISC-V) |
Clock speed |
Up to 133 MHz |
Up to 150 MHz |
On-chip SRAM |
264 kB in six independent banks |
520 kB multi-bank performance |
Flash (non-volatile) memory |
No on-chip flash; support for up to 16 MB of off-chip flash memory through dedicated external (QSPI.XIP) bus. |
Option for on-chip flash depending on variant; support for up to 32 MB of off-chip flash memory through dedicated external (QSPI.XIP) bus. See RP2350 variants. |
External volatile working memory (PSRAM) |
Not supported. |
Supported by a QMI memory interface using the QSPI.XIP bus. |
GPIO pins |
30 GPIO pins, 4 of which can be used as analogue inputs. |
Depending on variant: 30 GPIO pins, 4 of which can be used as analogue inputs; or 48 GPIO pins, 8 of which can be used as analogue inputs. See RP2350 variants. |
Programmable Input/Output (PIO) |
Two PIO blocks, each with four state machines (eight in total). |
Three PIO blocks, each with four state machines (twelve in total). |
Peripherals |
See RP2040 features. |
Expanded set; see RP2350 features. |
Direct Memory Access (DMA) controller |
12-channel DMA controller with peripheral pacing and chaining. |
16-channel DMA with enhanced throughput and flexibility. |
AHB crossbar |
A fully connected, multi-master AHB-Lite crossbar connecting CPUs, DMA, and peripherals to multi-bank SRAM and flash. |
AHB5 crossbar, offering higher-throughput and bandwidth. |
Interpolator |
Dual interpolator blocks for fast integer maths and table lookup. |
Dual interpolator blocks for fast integer maths and table lookup. |
Integer divider |
Separate hardware integer divider accessed through memory-mapped register. |
Not present because the processors support hardware division in the CPU. |
Analogue-to-digital conversion (ADC) |
4 analogue inputs with internal temperature sensor, 500 kS/s, and 12-bit conversion. |
Depending on variant: 4 or 8 analogue inputs with internal temperature sensor, 500 kS/s, and 12-bit conversion. |
Core regulator architecture |
On-chip, programmable Low-Dropout (LDO) to generate core voltage. |
On-chip buck converter (SMPS) for active operation plus optional low-quiescent-current programmable LDO mode for sleep states. |
On-chip Phase-Locked Loops (PLL) |
Two PLLs for core clock and USB clock generation. |
Two PLLs for core clock and USB clock generation. |
Security features |
None (basic MCU). |
Arm TrustZone; cryptographic accelerators. |
Deployment boards |
Raspberry Pi Pico; third-party RP2040-based boards. |
Raspberry Pi Pico 2; third-party RP2350-based boards. |
Programming |
C/C++ SDK, MicroPython |
C/C++ SDK, MicroPython |
RP2040
Edit this on GitHub
RP2040 is the original Raspberry Pi dual-core microcontroller. It’s packaged in a 7 x 7 mm QFN-56 form factor and engineered for low cost, low power consumption embedded control applications. It delivers deterministic real-time performance, flexible I/O, and moderate computational capability for tasks such as motor control, signal processing, human-machine interfaces, and embedded data acquisition. For more detailed information about RP2040, see the RP2040 datasheet.
RP2040 powers Raspberry Pi Pico, Pico W, Pico H, Pico WH, and other third-party RP2040-based microcontroller boards. For more information, see Raspberry Pi Pico and RP2040-based boards.
RP2040 naming
Raspberry Pi silicon chips follow a naming convention that starts with RP to refer to 'Raspberry Pi', followed by a number. Specifically, the microcontroller name, RP2040, is derived as follows:
-
RP specifies that the chip is Raspberry Pi silicon.
-
2 refers to the number of processor cores.
-
0 refers to the type of core processor (Cortex-M0+).
-
4 refers to the amount of RAM, expressed as a logarithmic factor, which corresponds to 264 kB of on-chip SRAM.
-
0 refers to the amount of non-volatile storage, expressed as a logarithmic factor (where 0 means that there is no on-board flash memory).
RP2040 features
RP2040 is a standalone microcontroller designed for embedded systems, real-time control, and I/O management. Specifically, RP2040 provides the following:
-
Symmetric dual-core processor complex. The dual-core Arm Cortex-M0+ processor runs at up to 133 MHz and provides symmetric multiprocessing. The CPU cores provide equal low-power and efficient processing performance, and can run tasks in parallel. This is useful for real-time control, multi-tasking, and general embedded tasks.
-
Large on-chip memory. The 264 kB of on-chip SRAM in six independent banks provides fast internal memory for running code and storage data, and allows simultaneous access by CPUs and peripherals.
-
Support for external flash memory. RP2040 has no built-in flash memory, and so doesn’t store programs internally. Instead, RP2040 can run code directly from external flash memory over a fast QSPI interface, using caching to keep performance high. This allows you to choose how much flash storage your product needs and to use inexpensive, widely available chips.
-
Thermal monitoring. 4-channel ADC with internal temperature sensor, 500 kS/s, and 12-bit conversion; used for reading sensors and voltages, including an on-board temperature sensor.
-
Flexible hardware control with Programmable I/O (PIO). A mini processor subsystem that you can program to implement custom peripherals in hardware, consisting of two PIO blocks, each with four state machines (eight in total).
-
Fixed function peripherals. Built-in hardware blocks for standard protocols that handle common tasks and don’t need to be implemented in software, including:
-
Two UARTs for serial communication.
-
Two SPI controllers for data transfer.
-
Two I2C controllers for communication with low-speed peripherals.
-
16 PWM channels.
-
A USB 1.1 controller and PHY, with host and device support.
-
Internal temperature sensor
The internal temperature sensor in RP2040 is a low-resolution, user-calibrated sensor. If you don’t calibrate the sensor, it’s unlikely to be accurate.
Accurate temperature measurement critically depends on knowing the ADC reference voltage (VREF). Because the temperature conversion formula is highly sensitive to VREF, even small errors in this value can result in significant temperature inaccuracies. RP2040 doesn’t include an internal fixed voltage reference for determining VREF, and so the reference voltage must either be:
-
Measured externally (noting that it can vary over time).
-
Provided by an external precision voltage reference.
|
Note
|
The RP2040 sensor voltage falls as temperature rises. |
For more information about the internal temperature sensor in RP2040, see RP2040 datasheet: a microcontroller by Raspberry Pi.
Sleep mode power
RP2040 draws a typical ~180 μA, even in deep sleep. Sleep current depends on PVT:
-
Process; varies between chips.
-
Voltage; current varies linearly.
-
Temperature; current varies nonlinearly.
For minimal current draw use cases, we recommend that you completely power off the system or the RP2040 part of the system. For information about how to do this, see Power switching RP2040 for low standby current applications, adjusting as needed for your use case.
RP2040-based boards
You can use the first-generation of Raspberry Pi Pico microcontroller boards as development boards and as reference designs for other RP2040-based boards. For discussions about third-party RP2040-based boards, see the Raspberry Pi forums.
The design files for Raspberry Pi Pico and Pico W are openly available with no limitations. Raspberry Pi grants permission to use, copy, modify, and distribute the following designs for any purpose, with or without fee:
-
Raspberry Pi Pico (Cadence Allegro)
-
Raspberry Pi Pico W (Cadence Allegro)
Raspberry Pi also offers design files for the RP2040 microcontroller:
-
Minimal Viable Board (KiCad), a reference design for RP2040.
-
VGA Carrier Board (KiCad), a reference for using a Raspberry Pi Pico board for multimedia (also relevant to RP2350).
|
Important
|
Designs are provided 'as-is' and the author disclaims all warranties with regard to the 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 the design. |
RP2350
Edit this on GitHub
RP2350 is a high-performance, dual-core microcontroller available in four variants that differ in package size and the presence of on-board flash memory, described in RP2350 variants.
Compared to RP2040, RP2350 delivers higher core clock speeds, double the SRAM, more powerful Arm cores, new security features, and expanded interfacing capabilities, described in RP2350 features. For more detailed information about RP2350, see the RP2350 datasheet.
RP2350 powers Raspberry Pi Pico 2, Pico 2 W, Pico 2 with headers, Pico 2 W with headers, and other RP2350-based boards. For more information, see Raspberry Pi Pico 2 and RP2350-based boards.
RP2350 variants
RP2350 comes in four variants, differing by package size and whether stacked flash memory is included. For more information about how these variants are named, see RP2350 naming.
| Variant | Package | Package size (mm) | Internal flash memory | GPIO pins | Analogue inputs | PWM channels |
|---|---|---|---|---|---|---|
RP2350A |
QFN-60 |
7 x 7 |
None |
30 |
4 |
16 |
RP2350B |
QFN-80 |
10 x 10 |
None |
48 |
8 |
24 |
RP2354A |
QFN-60 |
7 x 7 |
Stacked 2 MB flash |
30 |
4 |
16 |
RP2354B |
QFN-80 |
10 x 10 |
Stacked 2 MB flash |
48 |
8 |
24 |
RP2350 naming
RP2350 follows the same naming convention as other Raspberry Pi silicon chips, but the number and letter at the end changes based on the variant. Specifically, the name variants of RP2350 are derived as follows:
-
RP specifies that the chip is Raspberry Pi silicon.
-
2 refers to the number of processor cores.
-
3 refers to the type of core processor (Cortex-M33).
-
5 refers to the amount of RAM, expressed as a logarithmic factor, which corresponds to 520 kB of on-chip SRAM.
-
The last number (0 or 4) refers to the amount of non-volatile storage, expressed as a logarithmic factor.
-
0 indicates that there’s no on-board flash memory.
-
4 indicates that there’s 2 MB of stacked flash memory.
-
-
The appending letter refers to the size of the microcontroller package, which is dictated by number of pins:
-
A indicates a smaller chip package with 60 pins, of which 30 are GPIO pins.
-
B indicates a larger chip package with 80 pins, of which 48 are GPIO pins.
-
RP2350 features
RP2350 is a standalone microcontroller designed for embedded systems, real-time control, and I/O management. Specifically, RP2350 provides the following:
-
Symmetric dual-core processor options. A choice of the following low-power, efficient CPU architectures that can run tasks in parallel at up to 150 MHz. For more information, see Architecture switching:
-
Dual-core Arm Cortex-M33
-
Dual-core Hazard3 RISC-V processor.
-
-
Expanded on-chip memory. The 520 kB of on-chip SRAM in ten independent banks provides fast internal memory for running code and storage data, and allows simultaneous access by CPUs and peripherals.
-
Expanded support for external flash memory.
-
Ability to run code directly from external flash memory over a fast QSPI interface with caching (similar to RP2040).
-
Ability to connect to external PSRAM (Pseudo-Static RAM) chips through the QMI interface.
-
-
Thermal monitoring. Depending on variant, 4-channel or 8-channel ADC with internal temperature sensor, 500 kS/s, and 12-bit conversion; used for reading sensors and voltages, including an on-board temperature sensor.
-
Flexible hardware control with Programmable I/O (PIO). A mini processor subsystem that you can program to implement custom peripherals in hardware, consisting of three PIO blocks, each with four state machines (twelve in total).
-
Fixed function peripherals. Built-in hardware blocks for standard protocols that handle common tasks and don’t need to be implemented in software, including:
-
Two UARTs for serial communication.
-
Two SPI controllers for data transfer.
-
Two I2C controllers for communication with low-speed peripherals.
-
Depending on variant, 16 or 24 PWM channels.
-
A USB 1.1 controller and PHY, with host and device support.
-
An HSTX peripheral for high-speed digital output, such as video.
-
-
Option for internal flash memory. Depending on variant, RP2350 can either run code from external flash memory or can include on-chip flash for program storage and faster access:
-
RP2350A and RP2350B have no built-in flash memory, and so don’t store programs internally. However, you can:
-
Run code directly from external flash memory over a fast QSPI interface, using caching to keep performance high.
-
Use one-time programmable (OTP) memory to boot from and store software. This is irreversible.
-
-
RP2354A and RP2354B include 2 MB of stacked flash memory.
-
-
Security. A comprehensive security architecture built around Arm TrustZone for Cortex-M, including:
-
Signed boot support.
-
8 kB of on-chip antifuse one-time programmable (OTP) memory.
-
SHA-256 acceleration.
-
A hardware true random number generator (TRNG).
-
Encrypted code storage and boot from flash.
-
Architecture switching
RP2350 includes a pair of open-hardware Hazard3 RISC-V cores, which can be substituted at boot time for the Cortex-M33 cores when you program the microcontroller.
The boot ROM can auto-detect the architecture for which a second-stage binary has been built, and reboot the chip into the appropriate mode. All features of the chip, apart from some security features and the double-precision floating-point accelerator, are available in RISC-V mode.
RP2350-based boards
You can use the Raspberry Pi Pico 2 family of microcontroller boards as development boards and as reference designs for other RP2350-based boards. For discussions about third-party RP2350-based boards, see the Raspberry Pi forums.
Raspberry Pi offers design files for the RP2350 microcontroller:
-
Minimal Viable Board (KiCad). This download provides two design files because there’s two packages for RP2350.
-
VGA Carrier Board (KiCad), a reference for using a Raspberry Pi Pico board for multimedia (also relevant to RP2040).
|
Important
|
Designs are provided 'as-is' and the author disclaims all warranties with regard to the 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 the design. |
USB identifiers
Many RP2040 and RP2350 chips use a combination of Raspberry Pi USB identifiers (Vendor ID and Product ID). If you make your own, third-party board based on RP2040 or RP2350, you might need a unique USB Product ID (PID) if:
-
You need to provide a custom Windows driver.
-
You want your device to be uniquely identifiable as a separate product.
Raspberry Pi has permission from USB-IF to licence USB PID values for its Vendor ID (0x2E8A) for common silicon components used with RP2040 and RP2350. This means that you can assign unique PIDs under our Vendor ID (0x2E8A). To reserve a USB PID associated with Raspberry Pi’s Vendor ID, follow the instructions in the Raspberry Pi USB PID Git repository.
If you don’t need a unique PID, you can still uniquely distinguish devices using any of the following USB text fields: iManufacturer, iProduct, and iSerial.