22 ms·
I like the RP2040
- written-beyond 2y agoInb4 esp32
- cockings 2y agoIt's mentioned in the article.
- topspin 2y agoThat bit of snark is about the ESP32 brigade that plagues every project or story that involves any non-ESP32 MCU, including this one. Yesterday I watched a long live video by the engineer of a open source engine management system, and he too had to deal with the ESP32 brigade in live chat. He has entirely reasonable technical justifications for his choices, and his explanation had about as much impact with the ESP32 brigade as I've come to expect.
- written-beyond 2y agoLook my comment was just a place holder for that brigade, I was just trying to keep it isolated to this comment so it doesn't plague the rest of the article. I genuinely find other MCUs very interesting and love reading about them and exploring them. However I do this Espressif has earned the fans and following they have. I've had the liberty of working with older platforms like the PIC32, and while I agree that every MCU has it's own use case, the developer community Microchip has no comparison to Espressifs. I will admit that I may be comparing apples to oranges.
- topspin 2y ago> keep it isolated to this comment Thoughtful, I suppose. Entirely futile, however, as you can see.
- cide1 2y agoThe lack of security features really limits where this can be used in commercial designs.
- hitekker 2y agoCan you explain how? Genuinely curious. The author only refers to "security theater" which seems to be when a product or system around a product makes people feel like they're safer, when actually it's not making anything more safer or more secure. https://en.wikipedia.org/wiki/Security_theater https://en.wikipedia.org/wiki/Security_theater
- kj4ips 2y agoI suspect this mostly refers to "Code Protect" or similar functions, that are designed to stop the user for extracting the firmware from a device in the field. Typically, when this is enabled, large parts of the debug interface stop working, and turning it off requires a "secure" erase, that clears the loaded firmware. While many CP implementations are flawed, or can be bypassed by a skilled attacker (power glitching, &c), I wouldn't say they are purely theater, as they raise the required investment from a <$10 ISP to $$$+ for something like a chipwhisperer.
- relaxing 2y agoConsider that in other fields of computer security we treat a device where attackers have physical access to be de facto compromised.
- riskable 2y agoEven with chip security features this is still the case (if an attacker gets their hands on it it can be compromised). There's no chip that exists that I'm aware of that can't be compromised to have its firmware dumped. It's like locks: Every time a manufacture claims to have made an unpickable lock someone goes and picks it. It's the same for chip security features. Microcontroller "security" features really are security theater and not actual security. The only real reason they exist is because certain vendors/"big buyers" will require it as part of their parts checklists (which is silly) and it provides a way for chip manufacturers to wriggle more money out of each sale.
- cockings 2y ago> The RP2040 is impossible to brick. It comes with a read-only bootloader that can either mount as a USB mass storage device (firmware updates can just be copypasted to the "storage device"), or use its own simple USB protocol. Can anyone explain what this means? How is it both read-only and updateable? If the latter, how is it unbrickable?
- orlp 2y agoThe bootloader is read-only. What the bootloader loads isn't. If the thing you're trying to boot into is faulty, it doesn't matter because you can just replace the thing the bootloader is trying to load. If the bootloader itself was faulty, the device would be bricked.
- sshine 2y agoTo elaborate on the alternative: When the bootloader is not read-only, you can upload another bootloader. This is great in a different way because custom bootloaders allow for more flexibility. For example, you may want to keep two copies of your firmware on the chip: One that you're uploading, and one you can fall back to if the most recent one has problems. This protects you against failure during firmware upload or post-deployment failure, because you only overwrite one of the two. So if the device switches off while flashing it, and you boot back up, a custom bootloader can just default to the older copy. But... what if you update the bootloader and it fails? Then you can't use the bootloader to upload new firmware. Bricked. To unbrick a bootloader you need to overwrite the bootloader using alternative methods that don't involve the bootloader, which usually involves attaching wires to the print. This is highly inconvenient in a production setting: Maybe your hardware is encased, embedded in a bigger thing, or located on a pole on a mountain top in a different country. So a read-only bootloader is a safe choice, and you can make other workarounds wrt. flexibility.
- HyulianGrader 2y agoNobody in their right mind is updating a bootloader in the field OTA, let alone one inaccessible on a mountain top.
- BruceEel 2y agodata sheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.p...
- cide1 2y ago[flagged]
- HyulianGrader 2y agonit: There are 6 different espressif microcontrollers in that table, not "dozens". Espressif also went many years with only the ESP8266, then many years more after introducing the ESP32 before this recent binge of releasing a new series every time they blink. ESP-IDF is really suffering for it, so I hope Raspberry avoid this fate or at least find a better way to support them all.
- em3rgent0rdr 2y agoConsidering how many different Raspberry Pis are out there now, I wouldn't be surprised if the Raspberry Foundation makes a plethora of newer microcontrollers.
- rdlw 2y agohttps://products.espressif.com/#/product-selector?language=en&names= https://products.espressif.com/#/product-selector?language=e... This is the official Espressif "ESP Product Selector". I checked everything in the ESP series, and limited to "Mass Production" status, and then it showed me a list of 175 products. I'm sure some of those are doubled up, or just the same chip with different packaging options or whatever, but as a potential customer I'm still presented with 175 things and told to pick one.
- dfox 2y agoMost of that are not bare microcontrollers (or “SoC”s as Espressif calls it), but entire modules with different combinations of SoC, Flash, PSRAM, antenna configuration and packaging. If you filter only SoCs, you get 39 products, which in fact are 9 different chips and rest are packaging variants and versions with package-on-package Flash.
- ajsnigrutin 2y agoMany of the variants listed are the same chip but with different amounts of storage, oboard vs external (vs both) options, etc.
- g15jv2dp 2y agoHow is ESP-IDF "suffering for it"?
- antirez 2y agoI switched from ESP32 to the RP2040 because it's a much more reliable and documented device. My only concern right now with the RP2040 is that there are many ESP32 models with SPIRAM but it's not so simple to find a SPIRAM equipped RP2040 board. To be honest, given that the C development environment of the RP2040 is so good, you can make good use of the memory, but when one wants to develop a large MicroPython project, the SPIRAM is really a great asset. Other than that, everything about the RP2040 is just great.
- dgroshev 2y agoI ended up cutting a section on Rust support from the post, but if you're open to Rust (iirc you were sceptical at some point?), async Rust is really pleasant to use in embedded. Dario Nieuwenhuis, one of the main people behind Embassy, gave a great overview talk at RustNL: https://www.youtube.com/watch?v=H7NtzyP9q8E https://www.youtube.com/watch?v=H7NtzyP9q8E
- the__alchemist 2y agoI disagree. Rust on embedded is fantastic (I do STM32 programming on rust all the time, and have used the RISC-V ESP chips and nRF-52 as well), but Async Rust on embedded suffers from the same problems of contagion and coloring that non-embedded async rust has.
- fleventynine 2y agoEverything had tradeoffs, but the composability of the state machines built by the compiler's async support allows you to easily build multi-tasking bare-metal systems with thousands of "tasks" and no RTOS (or SRAM-wasting threads). I highly recommend playing with Embassy for a week before discounting this approach for embedded software. If you care about RAM consumption, you need to share the stack between tasks, forcing you to write event-driven code. Rust async makes this easy, and a bit of function coloring is no big deal compared to converting blocking code into event-driven code the traditional way...
- deleted 2y ago[deleted]
- MegaDeKay 2y agoThe PIO's really are the star of the RP2040 show, giving it a capability that competing chips like the ESP32 can't match. They are appearing all over the place in the console hacking space for this reason. Lower power consumption in steep modes for battery-backed applications would be a welcome addition in any V2 version though.
- jsheard 2y agoThings like battery life will probably improve with experience, I was talking to a silicon guy about the RP2040 and they said it's pretty characteristic of a first generation design. The digital logic that can be validated on an FPGA is fine for the most part, but the analog elements are much more difficult to fine tune, hence the poor power consumption, poor ADCs, and lack of internal DACs or opamps in the RP2040, and why the Pico Ws radio is a separate off-the-shelf part rather than fully integrated like it is on the ESP32.
- nimish 2y agoAnalog is large area and expensive in general so sticking to good digital and passable analog is a very good strategy to keep costs down.
- dragontamer 2y agoModern Microcontrollers focus on analog because modern microprocessors start at like $5, maybe even cheaper. If you need digital girth, don't mess with lol 264kB RP2040 systems. Just buy $3 of DDR3L RAM (aka: 128MB) and run Linux for goodness sake. --------- Even ESP32 is a glorified Bluetooth/Wifi chip first and everything secondary. You have to have a niche at this price point to be competitive. RP2040's niche is the 264kB of SRAM, but not much else. It needs a bunch of external parts before it can become a reasonable solution as well, so its not really cost optimized IMO.
- immibis 2y agoYou can't run Linux on DRAM. You need a CPU.
- Havoc 2y agoHow are people using this in practice? I’ve never worked with a BGA device. I’m guessing you need to design a board send it to say pcbway and then have the equipment to solder the bga in?
- eulgro 2y agoIt's not a BGA, it's a QFN with a ground pad.
- Havoc 2y agoI see. What does that change in terms of process needed?
- a1o 2y agoBGA you need hot air and reflow but a QFN I think you can just position and solder by the side with a simple solder iron with a knife like tip.
- 15155 2y agoBGAs generally call for more complicated reflow profiles (including vapor phase reflow for very large BGAs - think 40mm+ FPGAs) and require X-ray inspection (if doing inspection at all.) BGA balls can have under-body solder voids, etc. BGA devices also generally specify a specific solder to use (leaded or lead-free won't be interchangeable.) Generally, all single-row package pin layouts are easier than double-row (BGA, WLCSP, 2-row QFN) to reflow.
- neilo40 2y agoAlthough it looks like BGA, it actually uses a QFN package where all the contacts are accessible at the edge. With a little practice they are relatively easy to hand solder (I've done many, not just rp2040)
- dvdkon 2y agoQFN packages are very nice to hand-solder in my experience, considering the pitch. Better than the bridge-prone pins of QFP. The bottom pads do need some preparation, but you don't need hot air or reflow.
- tiku 2y agoMy Switch is unlocked by a rp2040. A lot of devices could be modded with it, given the size etc.
- axoltl 2y ago"(This is the same microcontroller, just two bugfix revisions.)" It is exactly the same microcontroller! They're just two different packaging options. One is a 7" reel with 500 units the other is a 13" reel with 3400 units. (See "Ordering code" in the datasheet (https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.p...))
- dgroshev 2y agoOoops, you're right! Fixed & attributed.
- jsheard 2y agoThat said they have done a few bugfix revisions, RP2040-B0 is the original, -B1 has some refinements to the ROM code, and -B2 has further ROM changes and also fixes some silicon bugs from the earlier versions. If you're using the official SDK you probably don't need to care too much about which version you have though, because the standard high level libraries detect the hardware revision at runtime and enable or disable workarounds as needed.
- nickcw 2y agoIf you are an electronics hobbyist but don't want to make/design your own surface mount boards (like me) there are lots of very accessible RP2040 boards at very low prices. I've used it in the Raspbery Pi Pico ($5) which comes on a nice board with lots of IO. There is a W version for a bit more with WiFi. If you don't mind slightly less IO then you can order an RP-2040 Zero. I got 6 off AliExpress for about $12. These only have 23 IO pins but they have a reset button, USB-C and are tiny (1.5cm x 2.5cm). The nice thing about all of these is that they use the standard Raspberry Pi dev tools, micropython, C++ just works with convenient USB loading of the firmware.
- willis936 2y agoI like to shout out the pico ice. Most of the $30 price tag is for the UP5K tied at the hip, but for embedded projects where you have some sub-microsecond activities it's a (relatively) inexpensive option with open source tooling.
- moffkalast 2y agoUnless you're incredibly space constrained I don't really get the point of that 2040 Zero, it just costs more for fewer features. The Pico is already pretty tiny. The Pico is really good at pin interoperability at least, in the land of ESP, what appears to be lots of IO pins quickly turns into barely enough if you're lucky, with pins connected internally to flash or the bootloader or whatever. I really wonder why they even bother breaking those out. The ESP32-CAM comes with 10 data pins, and only 4 of them are actually generally usable lol.
- dgacmu 2y agoI think it's about the clones on aliexpress, which are about $2.50, vs $5 for the pico.
- crote 2y agoI also highly recommend shopping around for alternative RP2040-based dev boards. The official Pi Pico is surprisingly bad, and just about every alternative out there is better in one way or another. I mean, come on: no reset, huge form factor, only 2Mbit flash, micro USB - in 2024? Just about the only pro it has is that it is widely available.
- IshKebab 2y agoTL;DR: he likes it because there's only one version available, whereas most microcontrollers have many more than one variant. This seems like a very weak argument. IMO (just based on the specs; haven't actually used it), the main reason to use this is for the PIO stuff. That's a very niche use case though.
- t43562 2y ago...because that means there's a lot of support and documentation for that 1 variant and lots of people have solved problems and written about it, This is like the iPhone strategy against Nokia. When I worked at Nokia it produced many variant phones - each with a little more ram or a bit less or a better screen or a different chipset. This was because they thought that people bought on price and wanted to have a product at every price point. The builds took more than a week to finish, the bug fixing was horrendous. The software sometimes had to work with not enough RAM sometimes with different chipset bugs, different graphics limitations. It was a nightmare to produce a quality product. Then out of e.g. 18 phone models we had to customise each one for 1000 operators in the world which intensified the pain and effort. At that time Apple had one iPhone. It was over specified - lots of RAM, great graphics etc. They only had to test their code once - not 18 times.
- vitiral 2y ago... and because they designed the chip to be a jack of all trades, which he really likes.
- SillyUsername 2y agoThe ESP8266 and ESP32 from what I've seen have got far more documentation and support (also due to library compatibility between the two chips). I've personally not come across any lack of documentation or compatibility issues, which I guess only happens if you need to target many versions of a chip, which isn't a problem for most people unless you're an API developer.
- miunau 2y agoMaking software for all those models was exhausting. It took an entire team just to profile phones and make configurations for compilers (what is the screen resolution? does it have feature x? is there a physical keyboard, and how many buttons does it have? where are the crucial buttons located? ...), and then you ended up with hundreds of targets taking days or weeks to make a build. I know many programmers that quit the industry altogether during those times.
- amelius 2y agoI have just one question: is this product meant for the "hobbyist" space only?
- mmoskal 2y agoDefinitely not. My understanding is they got significant market share on lunch - since it was during the pandemic chip shortage and they were the only ones with sub year lead times.
- amelius 2y agoOk, but does it fulfill military or automotive standards?
- mordae 2y agoProbably yes, but it doesn't have the paperwork AFAIK.
- riskable 2y agoI don't know about military standards but there's only ONE automotive standard and it's ISO 26262: https://en.wikipedia.org/wiki/ISO_26262 https://en.wikipedia.org/wiki/ISO_26262 There's nothing in ISO 26262 that would prevent someone from using an RP2040 in a car. You'd just have to be redundant about everything which you have to do anyway regardless of the chip you choose. Also, ISO 26262 is not a law. It's up to the auto manufacturer whether or not they'd require it and no single chip on its own can claim to be "certified" (or similar) for ISO 26262 since the focus is on redundancy and error checking (which means one chip would check the status of the other and vice versa, not some special internal consistency checking feature... That's just marketing). Most "automotive" versions of chips (e.g. Atmel's stuff) are just branded that way. Atmel will make a claim like, "this chip has been tested to function properly under these sort of extreme conditions..." (that happen to match what car manufacturers are looking for) and then a car company would just trust that and make it so that only chips that are marked "automotive" and manufactured by Atmel will be allowed to be used by their electrical engineers (or suppliers). It's all entirely arbitrary though: If you can convince the manufacturer that your board works fine under the conditions they require they'll probably buy it. Well, they won't hold it against you that you used one chip or the other. They just want some assurances.
- jcalvinowens 2y agoThe lack of built-in flash kills it for me. STM32 M3s with comparable throughput are cheaper and don't require an external flash chip (example: STM32F103C8T6 for $1.20 from jlc). I love the generic PIO though, I really hope other manufacturers pick up on that.
- jsheard 2y ago> I love the generic PIO though, I really hope other manufacturers pick up on that. Unfortunately the Pi Foundation is seeking patents on the PIO architecture. I don't think they've been granted yet though.
- jcalvinowens 2y agoThat's really disappointing :/
- vitiral 2y agoseeking patents to then open source it? Right?... Right?!?
- amelius 2y agoIsn't that already covered by FPGAs? I mean, it is just a way of configuring ports. And FPGAs are much broader (also configuring computation).
- arlort 2y agoThe same features of pio can be implemented via FPGA, but it's a lot more complicated to do so, and probably you won't find FPGAs as cheap as on the pi
- nereye 2y agoOne example (PIO implemented in Verilog for use in FPGAs): https://github.com/lawrie/fpga_pio https://github.com/lawrie/fpga_pio
- 2y ago
- djfergus 2y agoFor hobbists buying dev boards note that an ESP32 comes with WiFi and maybe Bluetooth depending on the model, whereas a vanilla Pi Pico has no radio - you need a Pi Pico W for that, which in my experience is double the cost of an esp32 board. I agree with the authors points that the RP2040 is a great chip would love to see the Pico W pricing come down as popularity grows.
- snufkin97 2y agoYES! TL;DR: its more powerful yet cheaper than most of MCU market, well documented and very straightforward yet extendable on many levels I agree with the post in 100%, I use RP2040 for both hobby projects and my keyboard startup project (arrowmechanics.com in case sb was interested). IMHO What RP foundation did is the greatest breakthrough in the world of embedded tech projects since the popularization of atmegas.
- metadat 2y agoIf this RPi main chip costs $0.70, why does the finished product currently cost $93.00 (RPi 5)? They're quite expensive nowadays, I miss when you could purchase them for ~$30.00. Meanwhile, Expressif chips are literally everywhere and becoming ever more ubiquitous. Edit: Thanks friends for the correction. It is cool you can still buy an RPi Pico for $13.00 :)
- smcameron 2y agoThe RP2040 is not what the RPi 5 uses.
- wheybags 2y agoBecause it's not the same chip? https://en.m.wikipedia.org/wiki/RP2040 https://en.m.wikipedia.org/wiki/RP2040 read the the specs and it's clear that is not the main chip in an rpi 5
- j_leboulanger 2y agoBecause the RP2040 is not the main controller of the RPi. It's a micro controller, on which the Raspberry Pi Pico is based, at $4
- deleted 2y ago[deleted]
- seveibar 2y agoA raspberry pi 5 doesn’t use this chip (at least as the main chip). The RP2040 is for microcontrollers/embedded applications.
- oakesm9 2y agoThe main chip in a Raspberry Pi 5 is a Broadcom BCM2712. The main chip in the Raspberry Pi Pico is the RP2040, which costs $4.
- deleted 2y ago[deleted]
- 15155 2y agoIf you're paying $13 for a Pico, you're getting fleeced. These are $4 or less at most vendors, and JLC will assemble 5 for you for <$3/ea.
- flohoff 2y agoThe issue is that its a comparison about apples to peaches. The RPI2040 is JUST the chip whereas the ESP32 come with tons of peripherals for your liking. From Wifi/Bluetooth Antenna, LI Battery Controller, Ethernet whatever, Display or Camera Connector - You choose. And then we have a multitude of even CPU choices and when running on a coin cell it makes a difference powering a second, unnecessary core or even wifi. And with the C6 variants, Espressif even switches ISA again, from 8266, to ESP32 to a RISC-V based ISA. So you are comparing the first of its kind SOC with a decade old Family of SBCs.
- snufkin97 2y agoYou're right about the technicals, but I think its about the use cases. RP2040 is indeed one of its kind and is suddenly a great choice for so many projects, both hobby/educational and proffessional embedded devices. With its price vs possibilities it just covers soooo much when You know it's just one single chip version. To me, this is what tech progress is all about.
- HyulianGrader 2y agoIt's safe to assume he's talking about the chip in both cases. You can connect either of them to a battery charger, camera, or nuclear reactor but all of those 'peripherals' are completely irrelevant to this comparison.
- sophacles 2y agoSo is GP. The silicon chip itself for an ESP has: bluetooth, ethernet, wifi, SD/EMMC, and a bunch more "peripherals" built into it. The RP2040 does not. To make this painfully clear: For an esp32 to do wifi you wire the esp32 to an antenna. For an RP2040 to do wifi you wire the 2040 to another chip, and that other chip to an antenna. Do you see the difference?
- HyulianGrader 2y agoNo, that's both "just the chip", the chips have different peripherals. They both have the usual SPI, I2C, UART, ADC, etc., and they have their differences too. I could just as well say "For an RP2040 to do USB you wire the RP2040 to the connector. For an ESP32 to do USB you wire the 32 to another chip, and that other chip to a connector." It's clear to me GP has the impression that ESP32 is something more (a development board with an ESP32?) than the ESP32 "chip" itself.
- smcameron 2y agoWe've been using the RP2040 in the electronic badges[1] for the RVASec security conference[2] for the past several years, and it's been very nice to write software for. Here's the github repo for this year's badge (there's a software-only badge simulator so you can kind of play around with it even without the hardware, although some of the multi-player things that rely on infrared badge-to-badge communication won't be any fun): https://github.com/HackRVA/badge2024 https://github.com/HackRVA/badge2024 [1] Video of the 2023 badge: https://www.youtube.com/watch?v=KWZriUMNpLc https://www.youtube.com/watch?v=KWZriUMNpLc [2] https://rvasec.com/ https://rvasec.com/
- brcmthrowaway 2y agoWhy custom and not use NXP stuff?
- smcameron 2y agoBecause it's kind of a group project for the local hackerspace and it's evolved over a bit more than a decade (didn't always use rp2040, obviously).
- JohnFen 2y agoThe RP2040 is pretty cool. I've used them in a half dozen projects now. > Raspberry Pi pulled a Henry Ford and boldly went with just one microcontroller. However, this one size fits all thing doesn't work for me. I prefer to use the least microcontroller that will do the job I need done. > There is no choice, no right sizing, but that might be OK! An RP2040 costs ~70 cents, and not all gizmos are produced by the million. The reason I like to use the wimpiest microcontroller possible is not related to monetary cost. It's related to my power budget. Most of my projects are battery-powered, and having them use the least possible amount of juice is a huge advantage. But even so, why use a $1 microcontroller when a 20 cent one will do the job equally well?
- samatman 2y agoA much larger pool of online documentation, example code, and experienced hobbyists who like answering questions, is worth a great deal more than eighty cents. Getting more use out of the battery is a good and sufficient reason to use a less powerful controller, though. It being cheaper is nice in theory, but almost meaningless for a one-off project, in practice. I can't remember the last time I made a purchase which was a fraction of a dollar, it just doesn't move the needle.
- JohnFen 2y agoI haven't found a lack of documentation, examples, or available experts with most of the microcontrollers I use. It's great the RP2040 has those, but it's not a unique advantage to them. The RP2040 does have a great advantage for people who are new to the microcontroller game, though! For me, personally, that doesn't matter much because I'm not new at this. I agree, in a one-off or small run project, the cost of the microcontroller is usually irrelevant. I only mentioned it because when all else is equal, I'll go for the least expensive option anyway.
- deleted 2y ago[deleted]
- peteforde 2y agoI also like the RP2040, but I'd like to explain why I migrated away from it for my current project. First, the drama with PlatformIO really rubbed me the wrong way. I'm taking the side of the developers who are hurt by confusion in tooling. Second, the top of the line ESP32-S3 comes in a module format that can be dropped on a PCB with basically nothing but a few decoupling capacitors. The RP2040 requires careful placement of about a dozen components, including a crystal. Not only does a module reduce implementation complexity dramatically, standardization skips every engineer potentially making their own dumb component placement mistakes. Third, the ESP32-S3 has 14 GPIO pins that can be configured to do capacitive touch, while the RP2040 has none. Most of the projects that use RP2040 and capacitive touch rely on the MPR121, an IC that past its EOL and will likely cause a lot of hasty redesigns over the next few months. It's also worth saying that eventually RP2040 will likely release more or less powerful versions, and hopefully versions in a module format. I doubt they will ever let it become an STM or PIC situation, but the ESP32 product lineup doesn't look so crazy once you are acclimatized to it.
- geerlingguy 2y agoIt seems like Espressif are in the same situation as Pi w/r/t PlatformIO[1]. As an outsider, it sounds like PlatformIO was trying to extract a very large annual payment from RPi and Espressif, and that was after the initial support was added in, and some of the community started adopting it. It's a weird situation, but I think PlatformIO built up a dominant position by supporting all these platforms and accepting community contributions to do so, then tried extracting value from the manufacturers directly after the fact, blocking further community PRs that would add new board revisions or fix bugs. See related: [2] [1] https://github.com/platformio/platform-espressif32/issues/1225 https://github.com/platformio/platform-espressif32/issues/12... [2] https://github.com/platformio/platform-raspberrypi/pull/36 https://github.com/platformio/platform-raspberrypi/pull/36
- peteforde 2y agoThanks for all of your rational contributions to those many threads, Jeff. It is an extremely weird situation, and a deeply bad look. If I was pressed for an opinion, I would say that I wish Eben had taken the high road and gone all in on supporting PIO despite the tangy mystery aftertaste for the simple reason that it would be a net-positive for developers. The way things stand, migrating away from the Arduino IDE to using VSCode with RP2040 feels like you're being actively messed with; there's so many projects and forum posts that sound like the right path, when it seems like the actual answer should be super simple. This is super painful for newcomers.
- a1o 2y agoWell it's still young so of course there's only RP2040. I remember the 8051, 8052, 80C51, up to the recent ADuC845...
- seba_dos1 2y ago> Dozens of slightly different controllers. Why? Many of those listed are the same controllers in various modules. Espressif has a bunch of different µC series, but not that many. In contrast, aside of the whole Pico dev board, Raspberry Pi does not offer any ready-made module with RP2040.
- dragontamer 2y agoRP2040 is awkward in my experience. Everyone needs Flash, and RP2040 has none. Very few projects need more than 32kB of SRAM (especially on an anemic Cortex-M0+ core). You're missing an FPU (like on Cortex-M4 or higher chip), so DSP capabilities are awful even if your clock speed is high. RP2040 has awful power consumption: 20mA. The M0+ competitors are 10mA, 5mA, or even sub 1mA. Once we get to more recent Cortex-M23 or Cortex-M33 (or the 8-bitters)... many competitors sleep in the under 1uA (!!!) regime, meaning "always on" chips (when you're under 15uA or so, you're undercutting many battery's internal leakage currents, so your chip's current usage becomes a rounding error). RP2040 is incapable of "always on" computation like this, so this limits applicability. RP2040 has some peripherals, but its missing common modern components. Many competitors (AVR DB, TI's MSP430 and MSPM0, STM32G4) have OpAmps for mixed-signal conditioning. Most competitors have multiple analog-comparators. DACs are somewhat uncommon but AVR and TI offer them. ------- So comes the question: what kind of project are people using RP2040 for? It can't be cost-optimized, because by the time you buy a flash-chip and external oscillator you've overrun the costs of the competitors. Its not power-efficiency, because RP2040 is a power-hog. You're getting far less battery life compared to competitors. (Case in point: the microcontroller that handles your wireless credit-card transactions is battery-less, running purely off of the energy of latent energy waves in the NFC protocol. RP2040 will never reach these low levels of power consumption). Where I see RP2040 as useful, is utilizing its absurd 264kB SRAM (far, far larger figure than most chips). If you need a graphics framebuffer for a small 300x200 8-bit color screen or something, then RP2040 is probably the right choice. (60kB for the framebuffer, and likely 2 or 3 of them for various computations on the frame buffer). But outside of a display driver, its difficult for me to find projects where RP2040 is actually the correct choice. Besides, screens are relatively expensive (in both $ and in power consumption), so if you're getting a screen you probably can upgrade to a SAM9x75 with full 2D GPU, DDR3L 800MHz and Linux support for like $12 for those SiP packages. ------- At a minimum, the next version of RP2040 needs to include on-board Flash / on-board programming. This is something _every_ project needs (RP2040 needs to run its code off of _something_ anyway). The fact that it ships flash-free is incredibly absurd to me at least. RP2040 forces a microprocessor-mindset ("one chip" where you add a bunch of addons) inside of the low-cost microcontroller market segment. Its very strange.
- 2y ago
- 127 2y agoPIO is fantastic. Revolutionary. Not trivial to use but extremely powerful and adaptable. Too bad about the ADC. To be clear: the ADC is not "OK". It' s BAD.
- GeorgeTirebiter 2y agoUnfortunately, the poor ADC performance is due to a design / simulation error; at least you have to give them credit that they 'came clean' on the crappy performance, and explained it in the official documentation: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.p... section 4.9 See https://pico-adc.markomo.me/ https://pico-adc.markomo.me/ for a thorough analysis of the problems. Especially look at the DNL.
- uncletaco 2y agoRP2040 has single handedly reinvigorated a really niche market: custom controllers. Due to the wonderful work done on gp2040[1] which is open source game pad firmware, people can buy cheap, quality, fightsticks and leverless controllers for a lot cheaper than they can from vendors like Victrix or Razer. Not only that but because its open sourced the hobbyist side of the controller community are building RP2040 pcbs to accommodate all kinds of projects and weird controller ideas. [1] https://gp2040-ce.info https://gp2040-ce.info
- crote 2y agoI do wonder how much of that can be accounted directly to the RP2040. Projects like QMK[0] have been using a technically quite similar codebase for making DIY keyboards for quite a while now. At first glance I'm not really seeing anything in GP2040 which couldn't have been done with any other somewhat-modern MCU. The RP2040 has undoubtedly been the catalyst leading to GP2040's widespread adoption, but it seems the same could've happened with a Pro Micro instead. [0]: https://github.com/qmk/qmk_firmware https://github.com/qmk/qmk_firmware
- CarVac 2y agoNot to mention PhobGCC (I'm the lead dev) and its less-Gamecube-specific descendents such as ProGCC V3 and GC Ultimate and Phizard...
- uncletaco 2y agoI'll mention it. PhobGCC is awesome and thank you for making it!
- opello 2y agoDoesn't this discount things like the Brook boards (e.g., Zero-Pi[1]) that came before? I only take issue with "single handedly" because it seems not quite true to the history here. [1] https://www.brookaccessory.com/detail/53169470/ https://www.brookaccessory.com/detail/53169470/
- 2y ago
- crote 2y agoI have mixed feelings about the RP2040. On the one hand, it's a great chip for hobbyists. It's cheap, it's easily available, it's easy to build a board around, and it offers plenty of stuff for your average application. On the other hand, it's definitely a bit lacking from a professional perspective. The peripherals are fine, but once you start looking into the details it's easy to run into limitations. That XIP interface is great - but it doesn't support writing so you can't hook up an FRAM chip and expand your memory. That PIO interface is amazing - but having only 2x32 instructions is quite limiting once you try to implement more complex interfaces. And where are my Timer/Counters? No capacitive touch? Analog on only four pins? No 5V tolerance? No high-speed clock input for the PIO modules? Why can't I run the bootloader off the internal ring oscillator? Hmm, a USB-C PHY sure would've been helpful... I was also surprised about its poor ESD performance. An Atmega or STM32 can handle the occasional zap just fine - ESD protection is more of a nice-to-have on external-facing ports. The RP2040? If you don't add external protection to every single pin you are basically guaranteed to see a few of them die due to day-to-day use. To summarize: neat chip, great for hobbyists, wouldn't be my first choice in professional environments.
- doubloon 2y agoRaspberry pi was originally an educational non profit
- dfox 2y agoI suspect that the Synopsys DesignWare SSI macro in RP2040 can in fact be used for R/W PSRAM or FRAM, but the abridged documentation of it in RP2040 datasheet is not sufficient for one to configure it that way.
- crote 2y agoOoh, good point! I should definitely look into that.
- stefan_ 2y agoWhat do you mean by USB-C PHY? USB-C is the connector, and you can run USB 1.1/2.0/3.0/3.1 through it, but realistically a RP2040 can not feed even a USB 2.0 PHY.
- fxtentacle 2y agoThe real competition is the STM32 line-up, in my opinion. Much more computing power at a comparable price. Or half price if you only need a few MHz.
- 15155 2y agoThe real competition are Chinese WCH MCUs and STM32 clones (PY32 series.) Add $1.00 and you're into Cortex M7s with vastly more peripherals/power (NXP IMXRT1011.)
- AtillaBosma 2y agoI want to shout out the fighting game community with: https://gp2040-ce.info/ https://gp2040-ce.info/ It has been using the RP2040 to create cheap and easy to make controllers for fighting games while providing the lowest possible input delay. The RP2040 does a great job acting as a chip for the base of a gamepad, so it doesn't even have to be for a fighting game controller, but any controller you want to create.
- weinzierl 2y agoI think the PIO state machines are pretty cool and relatively unique. I am also glad the Foundation resisted the temptation to market them as extra cores and sell the RP2040 as 10-core processor. When it comes to the Raspi Pico and similar devices[1], I think UF2 flashing is the best thing since sliced bread. This alone lowers the barrier for beginners significantly. Things I don't like: power consumption. But you can't have everything... [1] I know it is not restricted to RP2040 boards, but I think it is nowhere as common as there.
- mdp2021 2y ago> Things I don't like: power consumption I understand it could use ~0.08W, given it draws 3.3V at ~24mA... I am not a specialist, is that a lot? Ref.: https://learn.sparkfun.com/tutorials/rp2040-thing-plus-hookup-guide/all https://learn.sparkfun.com/tutorials/rp2040-thing-plus-hooku...
- dragontamer 2y agoTI's MSPM0G350x (also a low-cost Cortex-M0+ design) runs full-tilt at 8mA, STOP-sleeps at 400uA, STANDBY-sleeps at 5uA, and SHUTDOWN-sleeps at 80nA. https://www.ti.com/lit/ds/symlink/mspm0g3507-q1.pdf https://www.ti.com/lit/ds/symlink/mspm0g3507-q1.pdf -------- RP2040's full-speed is okay. 20+mA is a lot but it is easily explained by the absurdly huge SRAM banks it has. But RP2040's sleep states are absolutely AWFUL. The Cortex-M0+ chips are all extremely power-competitive vs each other, because Cortex-M0+ is extremely low-end with regards to core-design. You're pretty much only getting a Cortex-M0+ because its the absolute minimum 32-bit processor on the market. (8-bitters and 4-bitters exist if you're willing to go even lower-end, but Cortex-M0+ is the bottom of ARM's offerings). So low-power seems to be a must in this market, IMO anyway. If you're willing to use higher amounts of power, you really should get a few more features, like an FPU on the Cortex-M4.
- seba_dos1 2y agoYes, it's a lot. It will empty a 1000mAh battery in about two days. In sleep states, you'll find it challenging to reach a single month on RP2040 while you can build things with other controllers that would last years on the same battery.
- gbin 2y agoIndeed the software support is awesome, even using rust on it is a pleasure!
- ta988 2y agoPosted yesterday, info about the successor to the RP2040: https://news.ycombinator.com/item?id=40642268 https://news.ycombinator.com/item?id=40642268
- Teknoman117 2y agoAdmittedly this is from a hobbyist perspective, but I'm hard pressed to reach for an ATmega for basically anything these days due to the RP2040, the Pico, and its clones. I do wish there were more ADC channels though. Even an external analog mux costs more than the whole RP2040...
- dheera 2y agoI much prefer the ESP32, the RP2040 doesn't even have WiFi or bluetooth, you would think every microcontroller should have those things these days.
- 15155 2y agohttps://www.lcsc.com/product-detail/Analog-To-Digital-Converters-ADCs_Texas-Instruments-ADS1115IDGSR_C37593.html https://www.lcsc.com/product-detail/Analog-To-Digital-Conver... Commercial 16-bit/4ch ADCs can be obtained for <$0.90 in modest quantities. The RP2040 ADC is not good, and I am not often sampling something close to my noisy MCU. I'd rather route I2C anywhere than worry about signal integrity routing my analog signal a mile across the board.
- robomartin 2y agoBack a few years ago, due to chip shortages I was forced to use the RP2040 on an industrial project. No option really. The first problem with the chip is that it has zero security. Not important for hobbyist, I get it, however, for professional applications, this can be very important. Not, it isn't always about not wanting people to read your code. The application in question was a networked industrial controller with a thousand nodes. At a minimum, there's a need to ensure that the code and data cannot be altered. External memory does not allow for this. Our customer understood supply chain issues and agreed to accept the RP2040 design provided we replaced all nodes (at a cost) once a non-RP2040 node could be manufactured. Before I talk about the other problem I have to admit not having looked at the RP2040 ecosystem for about two years. No idea if this has changed. The other problem is that the RP2040 team was --again, don't know if this changed-- down-right hostile about Windows. They would respond to requests for better Windows support with moronic statement like (paraphrasing) "Just switch to Linux. It isn't that difficult". These statements were both tone-deaf and ignorant of realities out there. When you start dealing with non-trivial, non-hobby designs, there's a need for practices such as PLM (Product Lifecycle Management). When your entire engineering organization is using CAD, CAM, EDA and other tools rooted in the Windows ecosystem, you might not have the freedom to switch to Linux just because you bought a little $0.50 chip. It doesn't work that way. Even worse, if we did that, we would be forced to store a full VM with the working Linux distribution and RP2040 toolchain with every single release of the design. Note I did not say "software". I am talking about mechanical, electrical, optical, multi-board firmware with different processors, tests, manufacturing, manufacturing testing, etc. In other words, the ill-informed "just switch to Linux" attitude simply revealed that --at least at that time-- this organization did not understand the professional/industrial embedded world in the way companies like ST and others actually do. The net result was that, as much as the chip was super-interesting, we dropped it like a hot potato as soon as we could and moved back to the STM ecosystem, where the chip provider doesn't think that asking us to upend our entire workflow for single chip is a sensible suggestion.
- 15155 2y agoGive me a USB high-speed PHY. Otherwise, NXP FlexIO is very similar to PIO and these are much more capable chips.
- snvzz 2y agoDreaming about a smaller, lower-power yet faster RISC-V CPU (many cores exist that are strong against cortex-M0+) with the RP2040's peripherals.
- 15155 2y agoZero of these MCUs have anything resembling the quality of CoreSight/CMSIS-DAP/Keil/etc.
- snvzz 2y agoOf course not, those are proprietary technologies specific to ARM. If anything, they implement RISC-V debug and trace specs, or earlier vendor-specific, as these specs are relatively new.
- 15155 2y agoWhich is why I stated "resembling." TIL about the RV debug/trace specs, this has been one of my major complaints. The vendor-specific stuff is plainly terrible. I don't see anything like SWD being consistently defined by this spec, though?
- snvzz 2y agoI advice to join the RISC-V Foundation, participate, and get what you want.
- tianleli 2y ago[flagged]
- Otek 2y agoSo how can one start with doing something useful with this sort of things. Let’s say I have backend experience, some spare cash and time to try to get into embedded
- felipemesquita 2y agoFor tutorials and hardware, check out Adafruit. If you’re okay with less polished documentation, also look into M5Stack (they are really cheap on AliExpress). I currently work in e-commerce using Ruby on Rails, which I really enjoy. However, I do miss my previous work on the weird side of software and electronics for art installations on galleries and events[0]. If anyone wants to chat about or pair on embedded development, feel free to reach out to me at my username at hey.com. [0]https://vimeo.com/389519079 https://vimeo.com/389519079
- demondemidi 2y agoDoes the RPI boot rom have DFU built in? If not, it can be bricked.
- vardump 2y agoIt's literally a ROM. You can't overwrite a ROM. There's no flash or EEPROM on the chip at all.
- demondemidi 2y agoYou don’t understand. If there is no DFU the next application cannot be fixed if it broken. Hence bricked. If the boot rom goes right to the sd card image then there is no problem. Almost all embedded devices have a secondary boot loader. Do you understand my question now?
- vardump 2y agoSorry, misread your question. Yes, it has a DFU on the boot ROM.
- demondemidi 2y agoAhh... thank you.
- 15155 2y agoNot "DFU" as in an implementation of the USB DFU 1.1 class, but a hardware boot ROM with spiritually the same mechanisms exists.
- childintime 2y agoTo me the RP2040 just screams "Hello, Zig!".
- pcdoodle 2y agoI'm a little bit late to the party here. The rp2040 is a great chip at a decent price point. However the internal ADC is quite bad for wide range readings. There's a few points around 512 / 1536 etc where it gets a "personality" in the readings. AVR seems to have this down much better along with internal references for even more accuracy.
- achalkley 2y agoThe RP20240 is not only available for embedded development in C, C++, Rust but also interpreted languages like Python and JavaScript. Super versatile.
- drbscl 2y ago> Raspberry Pi pulled a Henry Ford and boldly went with just one microcontroller... In return, Raspberry Pi ensured that everyone on the planet works with the same part. Compared to more traditional wide lineups, there is a disproportionate number of StackExchange questions, blog posts (including this one), experience, Github issues, libraries, and tools for the RP2040. I'm not personally convinced. Most of the ESP32 series is cross-compatible (at least for the shared pinout counts). I'd argue the brand recognition and marketing to hobbyists is more likely what brought the "community" around the RP2040.
- deleted 2y ago[deleted]
- _pferreir_ 2y agoI absolutely love the RP2040, and the PIO is extremely useful.
- airbreather 2y agoI currently design a product that needs to be battery powered and its just not possible in the same way on the 2040 as esp32 with the ULP and the deep sleep current.