0
\$\begingroup\$

Please note: Although this specific question has to do with the 32-bit ARM SAM3X8E Cortex M3 series, it is really a generic question that should be applicable to all microcontrollers, and therefore answerable by anyone who has significant experience with any MCU.

So the ARM SAM3X8E appears to only have 512KB ROM (that is, memory for holding flashed binaries), and 96KB RAM (that is, memory for running those flashed binaries). Hence if I have a binary, say, my-realtime-app.elf, that's 400KB and only consumes, say, 60KB (max) at runtime, it will happily store and run on this MCU.

I'm wondering if there is any way to "attach" (whatever that means) additional ROM/RAM storage to an MCU to overcome these limitations, and why this is or isn't possible to do.

For instance, say that my-realtime-app.elf undergoes extensive refactoring and starts doing all sorts of new computations and has new features, etc., and now is 12MB in size (the binary itself), and also now requires 15MB of RAM at runtime. This binary can no longer "fit"/run on the MCU, at least not without some kind of assistance. I'm wondering if I could somehow attach both additional ROM and RAM to the MCU, so as to give it more horsepower. If this isn't possible to do (for either scenario, ROM and RAM alike), I'd like to know why. And if it is possible, I'm interested in how.

I have to believe this is possible to do, but not sure about the approach/implementation. Also, I would imagine that the bit architecture of the MCU likely limits the size of the attached storage. For instance, this ARM MCU is 32-bit, which means it is only addressable up to 4GB. So it would not be able to handle binaries or runtime memory requirements about 4GB, etc.

\$\endgroup\$
3
  • 6
    \$\begingroup\$ This question is about hardware. Welcome to the world of embedded development, where if your code doesn't fit in the target device, you have too much of it. \$\endgroup\$
    – Blrfl
    Commented Aug 12, 2015 at 9:52
  • \$\begingroup\$ The model you mentioned (SAM3X8E) does not have a SDRAM controller. See SAM3X/SAM3A Series Complete, page 3, Table 1-1 Configuration Summary, footnote 6. Quote: "Available only on SAM3X8H in LFBGA217 package, which is mounted on SAM3X-EK evaluation kit for SAM3X and SAM3A series. The SAM3X8H device is not commercially available." \$\endgroup\$
    – rwong
    Commented Aug 12, 2015 at 13:08
  • \$\begingroup\$ Look at STM32 (from ST Microelectronics) FMC (flexible memory controller) and FSMC which are peripherals that allow connection to external memories, busses, etc. Other manufacturers should have similar offerings. \$\endgroup\$
    – Tut
    Commented Aug 13, 2015 at 11:23

1 Answer 1

3
\$\begingroup\$

A pure micro-controller has the memory busses (the wires and logic that connect the CPU to its ROM, RAM and peripherals) internally, hence there are no wires to connect an external ROM or RAM to. You are stuck with whatever ROM and RAM the manufacturer has included in the chip version that you are using. In most cases the manufacturer offers a range of related chips, the ROM and RAM size being one of the distingctive features of the various chips. You choose the chip that fits your needs. Your SAM3X8E seems to be in this category.

A pure micro-processor has no internal memory, and hence has external pins that are used to connect external ROM and RAM to. You choose the ROM and RAM to meet your needs.

There are hybrid chips, that have both internal RAM and ROM and pins that can be used to connect external RAM and ROM. (In some cases external memory can only be used for code, or only for data.) Such chips can be used either in microcontroller mode (without extrenal memory) or in microprocessor mode (with external memory).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.