Many semiconductor vendors including TI, NXP, STMicroelectronics, Microchip, and others play in the microcontroller market. As with nearly every semiconductor niche, microcontrollers have been getting bigger and badder for decades. In the 1970s, there were 4-bit microcontrollers for VCRs and other simple consumer electronics. There were scads of 8-bit microcontrollers, soon followed by 16-bit microcontrollers. Motorola Semiconductor (later renamed Freescale and eventually purchased by NXP) developed the 6801, 6805, 68705, 68HC08, 68HC11, 68HC12, and 68HC16 microcontroller families with literally hundreds of variants in each family. These days, 32-bit microcontrollers are very common.
Motorola Semiconductor was by no means unique among microcontroller makers. Microcontroller variants from every chip vendor seemed to proliferate like bunny rabbits, and every microcontroller vendor offered its own proprietary architectural flavor – or multiple flavors. When it was founded in 2002, Renesas consolidated a bunch of Japanese microcontroller architectures that originated at Hitachi, Mitsubishi, and, eventually, NEC. Then Arm started to pursue the microcontroller market, and, in a decade or so, put all those proprietary microcontroller processor architectures out to pasture.
Microcontrollers are not glamorous parts. They’re not made with the latest lithography. They don’t require exotic packaging or chiplet assembly. They don’t burn 100 watts. Given that, you might think they weren’t a critical part of the silicon menagerie. Make no mistake. Microcontrollers are critical members of the silicon ecology.
When I wrote “How Long Will it Take for the Chip Shortage to Ease?” last October, I specifically chose a photo of a vast sea of Ford pickup trucks spread across the scenery as being a characteristic snapshot of the shortage. Those trucks were awaiting microcontrollers. Microcontrollers are not the thoroughbreds of the processor world; they’re the workhorses.
Well, there’s a new microcontroller vendor in town and it wants your business. Further, it’s got enough semiconductor dice on hand for 20 million parts. You’ve very likely heard of this vendor. It’s Raspberry Pi. And they’re ready to sell you microcontroller chips by the reel through Raspberry Pi Direct at 70 cents each for a reel of 3400 devices. Just want one? That’ll be a buck, please.
Raspberry Pi has named its microcontroller the RP2040. It’s the same microcontroller found on the Raspberry Pi Pico board, which the company introduced last year. Already, there’s a software development ecosystem including an IDE, a C/C++ compiler, a MicroPython interpreter, and a TensorFlow Lite machine-learning framework built around this “new” microcontroller. The company has already sold 1.5 million Pico boards. That’s what you expect from Raspberry Pi.
How much microcontroller do you get for a buck? (And how much don’t you get?) It’s well worth a look.
Here’s a block diagram of the Raspberry Pi RP2040 microcontroller:
First, I have to say this. You’re getting a lot of microcontroller for a buck. This is a 32-bit, dual-core microcontroller with 264 Kbytes of on-chip RAM and an excellent assortment of peripherals typically found in a microcontroller. It’s also important to note what you’re not getting. There’s no on-chip Flash EEPROM, so program code needs to be stored somewhere else when power is off. This may seem like a great inconvenience compared to other microcontrollers with on-chip Flash for program and data storage, but it does allow you to put a large amount of program memory into your design with an 8-lead NAND Flash SOIC. On the negative side, the Flash chip is likely to cost more than the microcontroller.
The RP2040 can execute code directly from its internal RAM or from external memory (RAM or ROM) connected through a dedicated SPI, DSPI, or QSPI interface. A small instruction cache improves code-execution speed “for typical applications” when executing code from external memory, according to the manual. Also, the RP2040 has no built-in Ethernet or wireless capability. Those limitations notwithstanding, this is a very capable device.
It’s apparent from the design and from the company’s marketing materials that Raspberry Pi developed the RP2040 microcontroller to serve as a faster, more capable processor where you might otherwise use an Arduino. Were I in marketing at Raspberry Pi, I’d possibly be throwing the word “powerful” around with abandon, but I’m not. So, I won’t.
The heart of the RP2040 microcontroller is the deal-core processor, which is based on a pair of Arm Cortex-M0+ processor cores capable of running as fast as 133 MHz. These are 32-bit microprocessor cores that use an Arm Thumb compressed instruction set for superior code density. One significant point: these processor cores have no L0 instruction cache, so instruction cycle time is deterministic when executing code from on-chip RAM. You need that determinism for precise I/O control in many microcontroller applications. Back in the day, all microcontrollers featured deterministic instruction cycle times, but times have changed. The RP2040 is old school on this point.
There’s one more notable feature of the Arm Cortex-M0+ processor cores in the RP2040: they have hardware multipliers. That’s an important feature if your application is going to need any amount of mathematical calculation. It’s also very handy for Machine Learning applications.
The RP2040’s peripheral complement includes:
Most of these peripherals should be familiar to you, but the last item, the PIO blocks, likely isn’t. Each of the two PIO units is a small I/O controller, consisting of eight unidirectional FIFO memories (four input and four output), four complex state machines, a 32-entry instruction memory shared by the four state machines, and an interrupt controller. The four state machines simultaneously execute programs from the PIO unit’s shared instruction memory. There are only nine PIO instructions, and Raspberry Pi incorporated a PIO assembler into the RP2040 microcontroller’s SDK.
The PIO units’ FIFO memories queue data transferred between the PIOs and the rest of the RP2040 microcontroller system. GPIO pin mapping logic allows each state machine to observe and manipulate as many as 30 GPIO pins.
What can you do with these PIO units? They can be used to generate precise waveforms and can support a variety of existing I/O standards, including:
Emulating the 8080 and 6800 parallel bus protocols
PIO programming can be assembled directly by a human programmer, drawn from Raspberry Pi’s PIO library, or generated programmatically by the application software. I am certain that a cult following will grow up around these PIO units.
There’s a lot more crammed into the RP2040’s 56-lead QFN package. I’ve hit only a few highlights to pique your interest. I recommend downloading the 654-page data sheet and taking a look. However, the RP2040 silicon is not even half of the story. The real attraction, to me, is the existing ecosystem already surrounding this device. In addition to the software tools mentioned above, there are several low-cost, finished boards incorporating the RP2040:
These small boards, and many more based on the RP2040 microcontroller, are also available from Amazon, for somewhat higher prices. Many are included in Amazon’s Prime shipping program, so you could be programming an RP2040 in a day or so, if you wished. It’s a convenient, low-cost way to dip your toe into the microcontroller world.
You must be logged in to post a comment.
Sponsored by Cadence Design Systems
Optimize your verification workload, boost coverage, and accelerate root cause analysis to reduce silicon bugs and accelerate your time to market with Cadence Verisium AI-Driven Verification. Learn how this generational shift from single-run, single-engine algorithms to algorithms leverages big data and AI across multiple runs of multiple engines throughout an entire SoC verification campaign.
Click here for more information
Sponsored by Texas Instruments
TI’s SHP space-qualification level provides higher thermal efficiency, a smaller footprint and increased bandwidth compared to traditional ceramic packaging. The common package and pinout between the industrial- and space-grade versions enable you to get the newest technologies into your space hardware designs as soon as the commercial-grade device is sampling, because all prototyping work on the commercial product translates directly to a drop-in space-qualified SHP product.
Click to read more
Sponsored by Mouser Electronics and Toshiba
Power multiplexing is a vital design requirement for a variety of different applications today. In this episode of Chalk Talk, Amelia Dalton chats with Talayeh Saderi from Toshiba about what kind of power multiplex solution would be the best fit for your next design. They discuss five unique design considerations that we should think about when it comes to power multiplexing and the benefits that high side gate drivers bring to power multiplexing.
Click here for more information about Toshiba Gate Driver + MOSFET for 5-24V Line Power MUX