Electronics Guide

Memory Systems

Memory systems form the foundation of data storage and retrieval in embedded applications. From a few kilobytes of on-chip SRAM in a low-power microcontroller to multiple gigabytes of external DRAM in an automotive compute platform, the memory architecture profoundly influences system performance, power consumption, reliability, and cost. Designing an embedded system well means choosing the right memory technologies, organizing them into an effective hierarchy, and connecting them through interfaces that deliver the required bandwidth within strict timing, power, and signal-integrity budgets.

Modern embedded systems combine several memory types, each optimized for a different role. Fast, expensive memory close to the processor serves immediate execution needs, while slower, denser memory provides bulk working space, and non-volatile memory retains code and data across power cycles. The topics in this category examine these technologies and the design techniques that bind them into a coherent system.

Articles in This Category

The Memory Hierarchy

No single memory technology is simultaneously fast, dense, cheap, low-power, and non-volatile. Embedded designers resolve this tension with a hierarchy that places small amounts of fast memory near the processor and progressively larger, slower, denser memory farther away. Each level trades capacity against access time and cost so that, on average, the processor sees latency close to that of the fastest level while enjoying the capacity of the largest.

Registers and On-Chip SRAM

Processor registers and tightly coupled memory deliver single-cycle or near-single-cycle access. On-chip static RAM (SRAM) backs caches, scratchpads, and the working memory of many microcontrollers. A conventional SRAM cell uses six transistors per bit, which makes it fast and refresh-free but far less dense than DRAM at a comparable process node, so practical on-chip capacity ranges from a few kilobytes on small microcontrollers to a few megabytes on high-end parts. Many application-class cores add instruction and data tightly coupled memories, exemplified by the ITCM and DTCM of the Arm Cortex-M7, which sit on dedicated ports and offer cache-like speed with fully predictable timing.

Caches and Scratchpads

Where a processor runs from slower external memory, one or more levels of cache absorb the latency. A level-one cache is typically split into separate instruction and data caches of a few tens of kilobytes each; a unified level-two cache, where present, is larger and slower. Caches work because real programs exhibit temporal and spatial locality, and they succeed or fail on hit rate: a miss that reaches external DRAM can cost hundreds of processor cycles. Scratchpad memory is the deterministic alternative. Rather than caching automatically, the software maps critical routines and data structures into a small on-chip region explicitly, trading the convenience of a cache for timing that a worst-case execution-time analysis can bound.

Main Memory: DRAM, DDR, and LPDDR

Dynamic RAM (DRAM) stores each bit as charge on a single capacitor with one access transistor, achieving far higher density than SRAM at the cost of higher latency and the need for periodic refresh. Because the charge leaks away, every row must be refreshed on a fixed interval, commonly 64 milliseconds at moderate temperature and half that above roughly 85 degrees Celsius. Refresh consumes bandwidth and power, and it is one reason DRAM is unsuitable for the deepest sleep states.

Synchronous DRAM clocks transfers to a memory-controller bus, and successive DDR (double data rate) generations have raised throughput by transferring data on both clock edges and by widening the internal prefetch. DDR4 at 3,200 MT/s delivers roughly 25 GB/s across a 64-bit channel while first-word latency remains on the order of thirteen to fifteen nanoseconds, a reminder that bandwidth has scaled far faster than latency. DDR5 continues the trend and splits a module into two independent narrower subchannels to improve command efficiency.

Battery-powered and thermally constrained designs use the low-power LPDDR family instead. LPDDR trades some peak performance and some latency for lower supply voltages, narrower channels, and aggressive power-down and partial-array self-refresh modes. LPDDR5X was standardized at 8,533 MT/s and extended further in later revisions of JESD209-5, and JEDEC published the LPDDR6 standard (JESD209-6) in July 2025 with data rates from 10,667 to 14,400 MT/s, aimed squarely at mobile and on-device artificial-intelligence workloads. LPDDR is almost always mounted as a package-on-package or soldered-down device rather than a module, which shortens the channel and helps signal integrity.

Non-Volatile Code and Data Storage

Non-volatile memory retains its contents without power and holds firmware, configuration, and persistent data. NOR Flash supports fast random reads and execute-in-place (XIP), making it well suited to code storage, whereas NAND Flash is organized into pages and blocks for high-density bulk storage at a much lower cost per bit. The asymmetry matters: both technologies read at fine granularity, but they must be erased a whole block at a time before a location can be rewritten, and NAND is written a page at a time.

Endurance separates these technologies as sharply as density does. NOR Flash and microcontroller embedded Flash are typically rated in the range of ten thousand to one hundred thousand program/erase cycles per block, byte-writable EEPROM commonly reaches about one million cycles, and multi-level NAND falls to a few thousand cycles or fewer as more bits are packed into each cell. Serial FRAM sits at the other extreme; Texas Instruments rates the FRAM in its MSP430FR microcontrollers at on the order of 1015 accesses, which makes it attractive for calibration constants, event logs, and other frequently updated data. Because Flash wears out and because dense NAND is intrinsically error-prone, non-volatile subsystems depend on wear leveling, bad-block management, and error-correcting codes ranging from simple BCH to LDPC in modern parts.

Managed Bulk Storage

Systems that need gigabytes rather than megabytes rarely attach raw NAND directly. Managed NAND packages the array with a controller that hides bad blocks, wear leveling, and ECC behind a block-device interface, sparing the host from implementing a flash translation layer. Embedded MultiMediaCard (eMMC) uses a parallel bus whose HS400 mode tops out at a 400 MB/s transfer rate and remains common in cost-sensitive designs, while Universal Flash Storage (UFS) uses a full-duplex serial link built on the MIPI M-PHY and UniPro layers, supports command queuing, and reaches several gigabytes per second in current generations. Removable SD and microSD cards fill the same role where field replacement or user-supplied media is required, at the price of far less predictable quality and endurance.

Emerging Memory Technologies

Several non-volatile technologies are moving from research into embedded products, driven largely by the economics of embedded Flash at advanced nodes. Charge-trapping Flash requires roughly six to eight extra mask layers on top of the baseline logic process, and that adder grows costly enough that the industry broadly treats 28 nm and 22 nm as the practical end of the embedded Flash roadmap. Magnetoresistive RAM (MRAM), particularly spin-transfer-torque MRAM, is the leading successor because it is built in the back end of line and needs only about three additional masks. Foundries have offered embedded MRAM at 22 nm since roughly 2018 and have since qualified it on 16 nm FinFET processes for automotive microcontrollers, where its byte-addressable writes shorten a firmware update from minutes to seconds.

Resistive RAM (ReRAM) targets low-cost microcontrollers and secure elements, where its simple cell structure and low write energy matter more than raw speed, and ferroelectric RAM (FRAM) remains popular for ultra-low-power data logging in metering, medical, and smart-card applications. All of these technologies blur the traditional line between volatile working memory and non-volatile storage, enabling architectures such as persistent working memory and true instant-on operation.

Organizing the Address Space

Choosing memory devices is only half the task; the system must also present them coherently to software. A memory map assigns each memory and peripheral a range of the processor's address space, and the linker script binds program sections to those ranges. Code may execute in place from NOR or embedded Flash, or a bootloader may copy an image into faster RAM before jumping to it, and the choice trades startup time and RAM footprint against execution speed.

A typical firmware image separates read-only code and constants, initialized data that startup code copies from Flash into RAM, zero-initialized data, and the stack and heap. Deterministic designs go further, placing interrupt vectors, hot loops, and DMA buffers in specific regions to control timing. On systems with caches and bus masters other than the processor, those placements interact with coherency: a DMA engine writing into a cached region requires either hardware coherency or explicit cache maintenance, and buffers are commonly placed in a non-cached region to avoid the problem entirely. Alignment and size restrictions imposed by a Memory Protection Unit, which usually offers a limited set of regions such as eight or sixteen on Arm Cortex-M parts, shape the map as well.

Design Considerations and Trade-offs

Embedded memory systems must balance competing requirements, and the right choice is always application-specific.

Capacity, Bandwidth, and Latency

Capacity must accommodate program code, static data, and runtime structures such as stacks, heaps, and buffers, with headroom for future firmware releases. Bandwidth must keep pace with processor throughput and data-intensive peripherals so that memory does not become the bottleneck, and latency directly affects real-time responsiveness. A motor controller toggling a few outputs, a network processor moving packets at line rate, and a camera pipeline holding several full frames in flight place radically different demands on the memory subsystem, and each is dimensioned accordingly. Frame buffers are a useful sanity check: a single 1080p frame at 24 bits per pixel occupies about 6 MB, which alone rules out on-chip SRAM.

Power and Cost

Memory can dominate both the power budget and the bill of materials. DRAM refresh, interface signaling, and large SRAM arrays all draw power, so low-power designs exploit partial-array self-refresh, clock gating, retention modes that preserve only a portion of the SRAM, and aggressive power-down states. Leakage matters as much as switching activity in devices that spend most of their life asleep, which is one reason non-volatile working memory is attractive: a system built on FRAM or MRAM can lose power entirely and resume without a restore step. Cost pressure pushes designers toward the smallest sufficient capacity and the densest economical technology, balanced against the engineering effort that a more complex hierarchy demands.

Determinism and Reliability

Real-time and safety-critical systems value predictable timing as much as raw speed. Caches improve average performance but complicate worst-case execution-time analysis, so designers may lock cache ways, pin critical code and data in scratchpad memory, or use a Memory Protection Unit to enforce isolation without the variability of full demand paging. Reliability features such as single-error-correcting, double-error-detecting ECC on SRAM and DRAM, memory built-in self-test executed at startup, and Flash endurance management protect against soft errors, latent manufacturing defects, and wear. In automotive, aerospace, and medical electronics these features are not optional; functional-safety standards expect memory faults to be detected and handled within a defined fault-tolerant time interval.

Interfaces and Signal Integrity

The interfaces linking processors to memory, on-chip and off-chip, must deliver the required bandwidth while meeting setup-and-hold timing and maintaining signal integrity. High-speed DDR buses demand careful length matching, controlled impedance, termination, and calibration and training sequences that the controller runs at every startup to compensate for process, voltage, and temperature variation. Serial Flash interfaces such as Quad and Octal SPI trade pin count and bandwidth for far simpler routing, and many microcontrollers pair them with a small cache so that code can still execute in place. Memory controllers sit between these physical realities and the processor, translating requests into the precise command and timing sequences each technology requires and reordering them to keep banks busy.

Summary

Effective embedded memory design is the art of combining complementary technologies into a hierarchy that meets an application's capacity, bandwidth, latency, power, cost, and reliability targets at once. The articles in this category examine each layer in detail, from the SRAM caches and DRAM main memory that supply working data, through the Flash and emerging non-volatile devices that preserve it, to the controllers, management units, and file systems that organize access. As embedded systems take on heavier compute and data workloads, and as non-volatile technologies erode the old boundary between memory and storage, mastering these trade-offs becomes increasingly central to sound system design.