4 ms·
The RP2040 is a Cortex-M0, which is about the smallest core you find on modern systems but still a pipelined 32 bit RISC machine running in the dozens of MHz.
by ajross 9mo ago
The RP2040 is a Cortex-M0, which is about the smallest core you find on modern systems but still a pipelined 32 bit RISC machine running in the dozens of MHz.
Note though, that the article is really about the PIO device on these SOCs', which isn't part of the main CPU at all. It's sort of a very limited programmable hardware engine for the specific task of doing PCB level interconnect using GPIO and lightly buffered streaming. In some sense it's like a thematic midpoint between an FPGA and a CPU.
It's... honestly it's just really weird. And IMHO has really, really, REALLY limited application. It's for people who would otherwise be tempted to bitbang an I2C or UART, but not for ones who can put hardware on the board themselves, or who have a FPGA handy, or even for people who want to do non-trivial stuff like QSPI displays[1] or whatnot.
Basically PIO smells like a wart to me. I genuinely don't know who wants it. Regular hackers aren't sophisticated enough to use it productively and the snobby nerds have better options.
[1] The linked article appears to be doing a quarter-VGA display in 3-bit/8-color, and is sort of right at the limit of the power of the engine.
- dmitrygr 9mo ago>Basically PIO smells like a wart to me. I genuinely don't know who wants it. Regular hackers aren't sophisticated enough to use it productively and the snobby nerds have better options. what are you blathering on about, sir? driving complex displays with no spu use: https://dmitry.gr/?r=06.%20Thoughts&proj=09.ComplexPioMachines https://dmitry.gr/?r=06.%20Thoughts&proj=09.ComplexPioMachin... (my work) pretending to be memory stick and sd card at dozens of mhz as a slave to a sync bus (my work) ethernet: https://github.com/kingyoPiyo/Pico-10BASE-T https://github.com/kingyoPiyo/Pico-10BASE-T (not my work) 68k bus slave (my work) usb host https://github.com/sekigon-gonnoc/Pico-PIO-USB https://github.com/sekigon-gonnoc/Pico-PIO-USB (not my work) all on a $1 chip
- ajross 9mo ago> what are you blathering on about, sir? Please don't. I mean, I applaud your work. But let's also be honest (in the "tough love" sense): those are all toys with significant limitations that preclude anyone shipping any of them on an actual device to an actual consumer. I mean, your SOC (maybe a $2 one) surely already includes a SPI master and USB host! Actual interconnects that solve real market problems have big boring spec books and competing implementations and silicon vendors. The application for PIO is basically limited to "I have to connect to this crazy old junk and no one makes the part I'd otherwise need".
- Gracana 9mo agoHaving dealt with the errata sheets for microcontrollers with all those fancy IO devices that solve real marketing problems etc, I'd kill to fix those problems with a software upgrade.
- dmitrygr 9mo agoif you find a SoC for $1 that has 2 Ethernet ports, and a usb host on it, while also having two cores and supporting 32MB of RAM you'll surprise me. rp2350 does all of the above for $1
- duskwuff 9mo agoHave you tested out the 2x PSRAM configuration; if so, have you written anything up about it? :) I've thought about a configuration like that myself but haven't committed to any hardware yet.
- dmitrygr 9mo agoyes i have tested it and no i have not written about it (yet). it does work and with the new ISSI 16MB chips, it gives 32MB of continuous memory!
- duskwuff 9mo agoAwesome - I might just have to try it. How are you handling startup? The approach I had in mind was putting boot flash on the second channel with a separate CS pin from PSRAM and configuring that in OTP; any idea if that would work?
- dmitrygr 9mo agoYes, sort of. Basically a tiny loader in OTP that enables nCS1 on some pin, copies code from there to ram on nCS0, reconfigures nCS1 to point to second ram. This does break usb flashing. Use swd.
- duskwuff 9mo ago> The linked article appears to be doing a quarter-VGA display in 3-bit/8-color, and is sort of right at the limit of the power of the engine. The resolution and color depth restrictions were the product of the low data rate of USB FS (~12 Mbps), not inherent limitations of PIO. > It's... honestly it's just really weird. And IMHO has really, really, REALLY limited application. I'd agree with "weird". But it's useful weird; it turns out that there are a lot of situations where PIO can avoid the need for an application-specific peripheral, and can provide that function in a more flexible fashion than a fixed-function peripheral could. Dmitry's SDIO device emulator is a great example - almost every other SDIO peripheral on the market is host-only.
- ajross 9mo ago> it turns out that there are a lot of situations where PIO can avoid the need for an application-specific peripheral And I can only repeat: I think that's an aspirational delusion. I'm not aware of anyone shipping a PIO solution to anyone in volume. It's "useful weird" to Hackerspace nerds like us, and that leads to some epistemological skew. Hardware needs to be boring and reliably supported (by people you can sue!) or else no one will bet a 10k unit PCB run on it. This is anything but.
- duskwuff 9mo agoI don't know if it's quite at the volume you're looking for, but ZuluSCSI [1] uses RP2350 (and, earlier, RP2040) for SCSI <-> SD. [1]: https://zuluscsi.com/ https://zuluscsi.com/
- ajross 9mo agoYeah, that's sort of the market that's picked it up: "I need to connect to old junk". And it would seem like a great fit, except that (as you point out) volumes are tiny and the benefit of a $1 chip vs. a $10 FPGA is high only at scale. I just checked, and that board is $70. Here's a significantly more capable device with an ESP32 and a iCE40 FPGA which could do the same things and more for $100: https://groupgets.com/products/ice-v-wireless https://groupgets.com/products/ice-v-wireless I have one and it works great, though not many people picked it up. It's actually available for $50 now, it looks like they're liquidating what they bought. Point being: is PIO really enabling new solutions in this market? No. At best it's providing a ~30% reduction in retail price for some oddball niche applications. Is that worth the cost of spinning the masks for the chip? IMHO, no.
- deleted 9mo ago[deleted]