EYE ON NPI – Raspberry Pi RP2040 #EYEonNPI #DigiKey #Adafruit @Raspberry_Pi @digikey

This week’s EYE ON NPI (video) is easy-as-pie: it’s the Raspberry Pi RP2040 microcontroller, finally available for purchase in tape and reel for manufacturing. The RP2040 is one of the most hotly-anticipated EYE ON NPI’s of the year – it’s been a few months since we’ve been enjoying the RP2040 in devboards.

Adafruit has featured it in many popular dev boards like the QT Py RP2040, Feather RP2040 and ItsyBitsy RP2040.

Thanks to the Raspberry Pi Foundation, Adafruit got a few early reels so we could develop our layouts and board designs – that whetted the appetites of a lot of developers who saw the massive number of designs available from Sparkfun, Pimoroni, Seeed and others and wanted to join in the fun! Well, now you can because Digi-Key is stocking the chips in reels for anyone to purchase.  They’re available in 7″ reels with 500 chips in a spool, or in 13″ reels with 3400 chips. At a cost of $1 each pre-quantity (quantity pricing is not yet determined).

For that $1, you get a lot of technology:

RP2040 Chip 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 analog 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

The RP2040 uses the Cortex M0+ core, which is is good for microcontroller projects. It’s not fast enough or capable of running Linux like a Raspberry Pi computer, but it can run Arduino/MicroPython/CircuitPython/RTOS pretty easily. To make up for the M0 core, the chip is run very fast, at ~130MHz, much faster than many of the Cortex M0’s we’ve worked with that tend to run at 48 Mhz or so. Since it is an M0 chip, it does not have a floating point unit or DSP hardware support – so if you’re doing something with heavy floating point math, it will be done in software and thus not as fast as a Cortex M4. For many other computational tasks, you’ll get close-to-M4 speeds!

For peripherals, there are two I2C controllers, two SPI controllers, and two UARTs that are generously multiplexed across the GPIO – check the pinout for what pins can be set to which. There are 16 PWM channels, each pin has a channel it can be set to (ditto on the pinout). While it’s not a full crossbar-type chip, it’s easy to find pins for your peripherals.

You’ll note there’s no I2S peripheral, or SDIO, or camera, what’s up with that? Well, instead of having specific hardware support for serial-data-like peripherals like these, the RP2040 comes with the PIO state machine system which is a unique and powerful way to create custom hardware logic and data processing blocks that run on their own without taking up a CPU. For example, NeoPixels – often we bitbang the timing-specific protocol for these LEDs. For the RP2040, we instead use PIO object that reads in the data buffer and clocks out the right bitstream with perfect accuracy. Same with I2S audio in or out, LED matrix displays, 8-bit or SPI based TFTs, even VGA! In MicroPython and CircuitPython, you can create PIO control commands to script the peripheral and load it in at runtime. There are 2 PIO peripherals with 4 state machines each.

While the RP2040 has lots of onboard RAM (264KB), it does not have built-in FLASH memory. Instead, that is provided by the external QSPI flash chip. You will need to provide external FLASH memory using QSPI NOR memory. The flash chip is shared between the program it’s running and any file storage used by MicroPython or CircuitPython. We like this GigaDevice chip but just about any QSPI flash memory will work just fine. You’ll also need a 12 MHz crystal and lots of capacitors and some passive components to finish off the design. You can check out the Adafruit Feather RP2040 for an open source design you can use to base your product or project off of.

For firmware you’ve got a lot of choices – There’s the pico SDK which is low level C/C++ with Makefiles, there’s MicroPython, CircuitPython and two Arduino ports – one from Philhower and one from Arduino officially via their mbed core.

With top-notch documentation, lots of board examples, firmware-aplenty, and of course a rock-bottom price, it’s an excellent chip to use for just about anything. Especially with the PIO peripherals, this chip can ‘punch up’ quite a bit and perform tasks or process data that normally would require much more powerful chips or advanced peripherals – things like cameras, TFT displays, motor drivers, PDM/I2S/PCM encoding and more. Sign up to be notified the moment the RP2040 chips are in stock at Digi-key here.

See more at Digi-Key at https://www.digikey.com/short/8mt22d38


Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Join 30,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


Maker Business — Savannah tells the story of the supply chain crisis in the U.S.

Wearables — Feathers from leather

Electronics — Get Oriented!

Python for Microcontrollers — Python on Microcontrollers Newsletter: Events, Projects, and much more! #Python #Adafruit #CircuitPython @micropython @ThePSF

Adafruit IoT Monthly — No-Code IoT with WipperSnapper, Beaming Internet across the Congo, and more!

Microsoft MakeCode — MakeCode Thank You!

EYE on NPI — Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 10/20/21 feat. DIN Rail 10×10 to Terminal Block Adapter!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.