Electronic – Understanding ROM/RAM in ARM MCUs

armmicrocontrollerramrom;

The 32-bit ARM SAM3X8E has 512KB ROM and 96KB of RAM onboard. This means that if I flash a binary to it that is, say, 400KB in size, and that consumes, say, 80KB RAM (max) at runtime, then that binary will "fit" on that MCU. However, I would not be able to flash an 800KB-sized binary onto the chip, nor would I be able to run a binary that consumes 1MB RAM at runtime. Makes sense.

Then there's the latest Raspberry Pi, sporting a 32-bit ARM A7 that has 1GB RAM on it (I couldn't find its ROM size). This has me wondering about what kind of voodoo and sorcery is at play with these ARM MCUs that are in the RPi:

  • Is the ARM A7 really that much more powerful (1GB vs 96KB?!?!) than the SAM3X8E?; or
  • Does the RPi have some kind of "supporting hardware" onboard that helps scale/extend the ARM A7 beyond its normal, KB-scale, capabilities?; or
  • Am I completely misunderstanding the A7's 1GB capability, and perhaps that 1GB is coming from a combination of the RPI's A& plus off-MCU memory, somewhere else on the board? In this case then I'm wondering what the RPi's MCU's ROM/RAM limits actually are, and why a SAM3X8E couldn't have been used instead.

Anyway I cut it, it just doesn't add up or make sense to me. How is one ARM product seemingly 10,000 times larger (memory capacity-wise) than another?!?

Best Answer

The RAM on the Raspberry Pi is off the CPU. On the original models this was in a package-on-package - the newer models have it mounted underneath the CPU, on the other side of the board.

You may well find that you could extend the SAM3X8E in the same way - most MCUs have an external memory interface for this sort of thing - search the datasheet for EMIF.

The reason you can't find the Raspberry Pi's ROM size is that it has a small binary blob on the CPU that then supports boot from flash - again external, and in the form of a micro SD card.

Oh, and as to why the Raspberry Pi uses the CPU it does? Eben Upton works for Broadcom...