Live data from Hacker News

RP2040 Boot Sequence

vanhunteradams.com

51–54 of 54 posts

Re: RP2040 Boot Sequence

#51

This complexity forced me to abandon it for learning and switch to STM32. I was able to write blinky with few dozens of assembly instructions for STM32. I spent like month reading about SPI, QSPI, flash chips and still was not able to understand how to proceed with RP2040 other than copy&paste their "bootloader" as an opaque blob. May be I'm weird, but for me RP2040 was terrible chip for learning ARM. STM32 on the ot…

What really sets apart RP2040 is the amount of SRAM you get for the price. Other "outsiders" like Espressif are also generous. Mainstream MCU manufacturers really skimp on it, even if you don't need Cortex-M4/7 to run a simple GUI you have to buy a whiz-bang part with huge pinout, very rich peripherals you won't need and a matching price tag for those.

Have a look at the Teensy 4.1, it comes with 7936K Flash, 1024K RAM and you can even add up to 2x8Mb PSRAM iirc. Of course it's a bit more expensive but not much.

Re: RP2040 Boot Sequence

#52
post #4

For those wondering about why there's both a boot ROM and the boot2 in flash: The flash chips used support both a basic SPI mode, and an advanced QSPI mode. There is a well-defined standard protocol for basic SPI mode, so virtually all chips will respond to the same read command for simple slow byte-by-byte reading. The only thing left to try is the four SPI modes (Does clock idle high or low? Do we transfer on the f…

Great info, and now some chips are supporting Octo-SPI which is even more vendor dependent. At some point we're basically back to parallel flash...

The irony of an 8-bit wide serial bus.... %-#

Re: RP2040 Boot Sequence

#53

This complexity forced me to abandon it for learning and switch to STM32. I was able to write blinky with few dozens of assembly instructions for STM32. I spent like month reading about SPI, QSPI, flash chips and still was not able to understand how to proceed with RP2040 other than copy&paste their "bootloader" as an opaque blob. May be I'm weird, but for me RP2040 was terrible chip for learning ARM. STM32 on the ot…

> RP2040 documentation is superb, I must admit. That's what they did perfectly.

In the end this is what really matters anyway; I'll take a fully documented complex chip over a black box whenever it matters.

Also while I appreciate everything that the RPi foundation does in their documentation efforts, I think they dont do a good job of indicating the difference between a lack of documentation and a lack of /public/ documentation. I would like to know a LOT more about the pcie interface between the Pi5 CPU and the custom peripheral controller for instance, but there's zero docs on it outside of kernel sources which are just a bunch of magic numbers and other undiscernable enchantments anyway.

Re: RP2040 Boot Sequence

#54

This complexity forced me to abandon it for learning and switch to STM32. I was able to write blinky with few dozens of assembly instructions for STM32. I spent like month reading about SPI, QSPI, flash chips and still was not able to understand how to proceed with RP2040 other than copy&paste their "bootloader" as an opaque blob. May be I'm weird, but for me RP2040 was terrible chip for learning ARM. STM32 on the ot…

What really sets apart RP2040 is the amount of SRAM you get for the price. Other "outsiders" like Espressif are also generous. Mainstream MCU manufacturers really skimp on it, even if you don't need Cortex-M4/7 to run a simple GUI you have to buy a whiz-bang part with huge pinout, very rich peripherals you won't need and a matching price tag for those.

I'm just here to remind everyone that doesn't already know that the "full" raspberry pi models are also quite accessible[1] as bare metal platforms today. If you need an MCU with 8GB of ram and 1TB of flash, you can absolutely have it!

I'd like to try to find an example project where I could do something with a bare metal Pi Zero 2W.

[1] https://circle-rpi.readthedocs.io/en/46.0/#

Post reply on HN