Putting The RP2040 On A Stamp

the RP2040 stamp

In the electronics world, a little one-inch square board with castellated edges allows a lot of circuitry to be easily added in a small surface area. You can grab a prepopulated module, throw it onto your PCB of choice, and save yourself a lot of time routing and soldering. This tiny Raspberry Pi 2040 module from [SolderParty] ticks all those boxes.

With all 30 GPIO broken out, 8MB of onboard flash, and a NeoPixel onboard, you have plenty to play with on top of the already impressive specs of the RPi2040. Gone are the days of in-circuit programmers, and it uses a UF2 bootloader to make it easy B to transfer new images over USB. Rust, MicroPython, Arduino, and the PicoSDK are all development options for code. All the KiCad files, BOM, schematics, and firmware are up on GitHub under a CERN license for your perusal pleasure. They’ve helpfully included footprints as well as a reference carrier board design.

It is a handy little project that might be good to keep in mind or just use as a reference design for your efforts. We have a good overview of the RPi2040 from an STM perspective. If you’re curious about what you could even use this little stamp for, why not driving an HDMI signal?

22 thoughts on “Putting The RP2040 On A Stamp

  1. Nice post, great to see more integration & accessibility ie bigger than SOT connections, eek. I’ve often used silabs parts for various embedded after moving up from Atmel’s 4051 & Motorola 68hc705 series, often felt if I went to an OS & higher level languages I’d feel losing out in controls & efficiency, style I guess as I seem to still think in z80 assembler with a built in translator for most other assemblers. Bit quirky as I used to teach pedal, Fortran in mid 1980’s

    So I’m curious how people go across the raspberry series for coding in assembler for embedded tight minimal overheads as in no OS (although later out etc is ok) only essential libraries for wifi, Lan and other higher level partially proprietary libraries etc hopefully re-entrant not interfering with timing of my code etc

    IOW. Like to cut my teeth on a suitable low end raspberry or equivalent/compatible platform gaining assembler experience then exploring incrementally more advanced to SOC types. Would love to do this on a windows 7 laptop or even an android tablet.

    Could I use the device described here with an off the shelf assembler or even an Integrated Development Environment, maybe something like silabs studio series etc ?

    I’m specifically interested in instrumentation logging, some Fourier and also tight timing controls of arrays of power delivery for diverse electro chem experiments, though occasional minor toy design has developed a minor interest…

    Thanks for the article :-)

    1. The PicoSDK is built around C, but you can of course drop in as much assembly as you like — it’s all gcc and cmake based so .S files should Just Work. I’d probably suggest using C on one core for the non timing-critical stuff and your custom assembly running on the other core for the bare metal stuff, communicating via mailboxes. Talking to hardware is mostly intended to be done by the C interfaces; they’re really nice, with overhead-free type-safe wrappers around all the hardware functionality. There _are_ some headers for use with assembly but I don’t think they’re the primary focus. But the hardware is well-documented so using it from assembly wouldn’t be difficult.

      The architecture is Thumb2, which is really easy to work with. So easy it’s incredibly dull, in fact.

      When I did the Fuzix port I ended up with exactly one assembler file (for the context switching). Everything else was in C.

      1. Cool, thanks :-)
        So long since I’ve done any C let alone C++ which I developed an aversion too. So I could use Win 7 fine for time being then :-). I still have an oldie Dell 1545 Inspiron, few minor repairs trimmed Win 7 professional, a breeze really quick been bloat free for ages, quite responsive though did upgrade to SSD, faster CPU & ram to max 8G bytes, yikes.
        When I was at W.A.I.T. back then (renamed to Curtin University) also taught Basic and dabbled in KL-10 assembler, loved the intriguing sharable high segment structure and address modes, that was a “super computer” of 1975 era, 256 K words 36 bit, handled 100 users all doing Basic, worked fine minimal delay – hacked a few times by 1st yr eng students hrrm, CPU cycle time around a micro sec, lots of registers as part of OS swap space etc

        Still have few micro development kits from early 2000’s and heaps of CROs, HP DSOs etc even an A0 roll feed plotter HP 7586B, which I hope to use soon to craft large sheets or rolls of supercap like materials for a power harvesting experiment…

        Btw typos in my post:-
        *Pascal – not pedal
        *paged out – not later out

      2. I mean they have the register definitions available and everything. If you’re programming in assembly anyway, directly writing to registers for peripheral access shouldn’t be a problem. People even have to do that in C and Rust sometimes (not on this platform specifically though)

    2. You mentioned Pascal. For the RPI family there is a project called Ultibo, over at Ultibo.org. I am starting to play around with it. Like it so far. No OS overhead. Just run your application on any RPI (the Zero through PI4) . Might be of interest. Not for the PICO though. I think the development package even runs on Windoze for those still on that OS.

      The Raspberry PI PICO C/C++ development environment will allow you integrate assembly modules no problem.

      So far I haven’t had to resort to assembly for code that runs on PICO or RPIs. Plenty of memory and CPU power for my needs with just C. Most of my apps so far work fine even with Python.

      Enjoy.

  2. This piece of news hides another interesting fact: this board is sold on lectronz.com, a platform that seems to position itself as a new modern alternative to Tindie…

    I’m a bit sceptical whether this new platform will find success in a shrinking market suffering from big supply chain issues, but It’s great to see new alternatives for the community!

    1. I tried to order a couple from lectronz. I created an account but it won’t let me do anything until my email is verified, which it hasn’t done in the 5 hours since I created my account!!! I still have my stuff in the cart waiting. They bragged that they wrote every bit of the store’s code themselves, but they better test it and fix their bugs! There’s no “contact” info other than twitter and Facebook and I refuse to do lame social stuff PERIOD. I’ll check that Tindie link next since I will probably give up on their web store (and so how do I terminate my account if they won’t activate it???).

      1. I got an email from lectronz shortly after my above post. In the process of emailing their support, I found that the reply links were in my SPAM (thanks to Gmail). I unSPAMed them and got my account setup and placed my order! I have had Gmail SPAM emails from my banks and credit cards because they are from 3rd party sites or link to 3rd party sites (like phishing), but this wasn’t that problem, so I don’t know why Google’s AI SPAMed it?

        1. If a lot of people have marked their emails as spam, Gmail may auto-mark that email as spam as well. I always check my spam mails when I don’t receive an email that I know shouldn’t take long to receive.

    2. Supply chain issues are the reason I’ve been giving the RP2040 a second look, it’s one of the few small SoCs that looks like it’s not supply constrained. Digikey, for example, has >65K parts immediately available.

  3. It’s nice, however, it seems they didn’t think this through very well. First the pins are 2mm instead of 2.5mm so it doesn’t fit standard breadboards. That’s a fail, IMHO. For just 5% bigger it would have been much better. Second the carrier board would be great to have had a small breadboard area so one could add say an ADS1115, I2C analog board or similar.

    1. Don’t think the focus is for breadboards but for a PCB placement. I don’t think even if spaced 2.5, that it would work well with a breadboard. My suggestion is buy a RPI Pico and breadboard it for your testing of your RP2040 application and then port to the stamp when you have your PCB design completed. That said, If you really want to use the stamp for testing you can just solder a wire to each pad and run to your breadboard project. A big many legged spider…. :)

  4. Too bad the 2040 has very little computing power.
    They’re great little controller boards, but I would have loved to have a 16gb emmc, quad(or more) core cpu at 2Ghz or higher, a HDMI and USB port and a wifi/BY antenna, as well as a heat sink . Tens of them stacked on top of one another, as a compute cluster.
    Currently the smallest viable design is Android TV boxes.

    1. The Raspberry Pi foundation actually makes a product more in line with what you described, it’s called… the Raspberry Pi.

      This is a different class of device entirely. You’re describing a Single Board Computer (SBC) with a System On Chip (SOC), such as the Raspberry Pi 4 or the Beagle Bone boards. The RP2040 is an MCU (microcontroller unit) – they are far far less computationally capable, but are far cheaper, more power efficient, and more suitable for hard realtime applications.

      Unfortunately, neither class of device provides world peace.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.