Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I 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.



What 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.


A PHY for the USB PD communication over the CC wires. That makes it possible to negotiate things like Alt Modes for a USB-C connector. DIYing one is surprisingly hard due to the voltages and timing involved.


The USB version doesn't directly imply link speed - USB 2.0 devices can be LS, FS, HS. The RP2040 can handily saturate LS/FS links.

With PIO or the SPI master and DMA you could absolutely make use of a USB HS PHY.


Well said. I'll add that, as a hobbyist, you'll eventually work on more involved projects and run into those exact limitations.


i'm curious what kinds of applications you've found fram most useful for. it seems like a really cool technology, but the price point is so high that i struggle to understand when you'd use it rather than a combination of sram (or psram) and nand


I assume that most people's use of FRAM is when its integrated into TI's MSP430 microcontrollers

IE: if FRAM comes free with your MCU, might as well use it and take advantage of its benefits. For example: MSP430FR4132, just picking one such MCU off of Digikey (https://www.digikey.com/en/products/detail/texas-instruments...)

------

Most of what I know of FRAM comes from TI's marketing pages. https://www.ti.com/document-viewer/lit/html/SSZTA32


probably so, but crote was talking about external fram chips

the msp430fr4132 you linked costs 160¢ in quantity 35, which is actually considerably cheaper than comparable flash-based chips like the msp430f233 https://www.digikey.com/en/products/detail/texas-instruments... which is 500¢ in quantity 25. so that's maybe one reason people would use fram: evidently it's cheaper than nor? but i'm pretty sure there are μcs with 8k of nor flash that are cheaper than that and in fact cheaper than the price difference. is this pricing policy some sort of loss leader by ti to drive fram adoption? it seems unlikely. does using fram instead of nor make it cheaper for ti to make the chip? surely 8k of nor couldn't account for such a large cost

on further investigation, i don't find μcs with 8k of nor flash that are cheaper than that, at least in stock at digi-key and still in production. https://www.digikey.com/en/products/filter/embedded/microcon... is the link to my search, which i trust hn will abbreviate in a useful way. but lcsc has the ch32v203 in stock for 39¢ in quantity 100 https://www.lcsc.com/product-detail/Microcontroller-Units-MC... and that has 20k of sram, 64k of flash (presumably nor!), and 24 gpios. that's half the gpios of the ti chip, but i believe my digi-key search linked above was not limited by pin count

so maybe the only reason fram costs more is that ti doesn't license the fram patents to chinese companies? it still beggars belief that ti (and microchip, st, etc.) would be spending three dollars a chip on 8k of nor, or even three dollars a chip divided by two layers of profit margin


AVR64DD14 is $1.20 qty25 for 64kB of Flash and 8kB of SRAM (and quite a bit more analog features, like dual-power supplies, more ACs, DAC, Differential ADC...).

So I'm pretty sure NOR Flash remains quite cheap. TI's MSP430 are all cheapest with FRAM though, so your question is curious. I admit I don't know where to go or how to investigate your question however. I don't really use MSP430 myself, I just know thats what is commonly associated with FRAM in the literature I've read.


huh, I wonder why it wasn't coming up in my search

just as a perspective point on 'quite cheap', nor is still about a thousand times more expensive than nand

i would never buy from ti. they hate hobbyists and have since at least the 70s. they put limor fried on a blacklist


The main application here would be that the RP2040 only has a single XIP QSPI bus. If you extend its memory by hooking up PSRAM to that bus, you can't boot because the chip loads all its code from QSPI. If you hook flash up to that bus, you don't have any way to add extra memory.

FRAM would allow you to have your cake and write it: your application code survives a reboot, and (if the chip were to gain write support) the remaining space could be treated like PSRAM.


i see, that makes a certain amount of sense, thank you. normally you can share a single spi or dual/quad spi bus between multiple peripherals with different /cs lines, but i guess that would be pretty tough to make work for instruction fetches. older chips like the 8086 had a pin to tell the memory system when it was fetching an instruction, but i haven't seen that feature in a long time, not even enabled by a fuse

you can probably use qpi that way (with both psram and flash) if you sacrifice xip and settle for loading overlays? you could even store them on qpi nand


I 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.


Ooh, good point! I should definitely look into that.


Raspberry pi was originally an educational non profit




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: