Embedded System Memory Selection Guide: DDR, SRAM, Flash & EEPROM

Dhananjayan
30. April 2014
Categories:Technology,  Embedded Software,  Industrial,  Optimization

Any element that can retain a state with time is called memory. Memory is the most important part of a processing system — both the instructions to be executed and the data being manipulated are stored in memory. This embedded system memory selection guide is the fourth post in Embien's embedded system design series, covering memory types and their applications across the industries we serve. As a comprehensive embedded system memory selection guide, this post covers DDR, SRAM, Flash, and EEPROM — the memory technologies encountered in almost every embedded product design.

Memory Usage

In this embedded system memory selection guide, memory usage covers two fundamental categories: Program storage and Data storage.

Program information comprises the opcodes (instructions) to be executed by the processor. They are generally stored in non-volatile memory mapped directly to the processor's address space, or stored externally and loaded into volatile memory prior to execution.

Data memory stores intermediate data being processed — for example, variables during algorithm execution or a Process Control Block in an OS — and the Stack, used by the processor for return addresses and local variables. In either case the memory type is volatile.

Memory Types for Embedded Systems Hardware

The primary differentiation of memory in embedded systems hardware is based on volatility — whether stored data is retained after power cycling the device. Accordingly, memory is classified as Volatile or Non-Volatile. Most embedded systems hardware designs require a combination of both types, and this embedded system memory selection guide covers each in detail.

Volatile Memory

Volatile memories hold their contents only when power is continuously applied. As soon as power is removed, the contents are lost. Primary usage is storing data, stack, and program instructions during execution.

Volatile memory is of type Random Access Memory (RAM) — data at any address can be accessed by placing the address on the address bus. It divides into two main types:

SRAM – Static Random Access Memory

Static RAM uses bi-stable latching circuitry to store each bit — no refresh is required, so data remains static as long as power is applied. The primary advantage of SRAM is its speed: fast SRAMs operate at processor speed, enabling single-cycle access times. Synchronous SRAMs are the preferred implementation for instruction and data caches. Since no refresh controller is needed, SRAMs are easier to use with low-end microcontrollers. The downsides are lower density and higher cost compared to DRAM.

DRAM – Dynamic Random Access Memory

DRAM stores each bit in a storage cell consisting of a capacitor and transistor. Because capacitors lose charge quickly, each bit must be refreshed periodically — hence the name "Dynamic". Due to structural simplicity (one transistor and one capacitor per bit), DRAM packs much denser than SRAM, offering a better cost-to-capacity ratio despite requiring a refresh controller.

SDRAM – Synchronous Dynamic Random Access Memory

SDRAM is a type of DRAM synchronous with the system bus, requiring an SDRAM controller typically integrated in the SoC. Data is organized in rows and columns, managed by an internal state machine handling fetch and refresh logic. High-speed varieties include DDR, DDR2, and DDR3. DDR (Double Data Rate) transfers data on both clock edges, doubling effective bandwidth. DDR2 and DDR3 offer greater data width and different power requirements while operating internally at similar rates.

High-Speed Design: DDR Signal Integrity Considerations

Among the most critical aspects of high-speed design involving SDRAM is signal integrity on the DDR bus. These high-speed design interfaces require careful PCB layout with proper terminations, controlled-impedance traces, and tight length matching between data lines. Embien's Electronic Circuit Design Services team specializes in DDR2/DDR3 high-speed design — ensuring signal integrity and timing closure across the memory bus. Even a 0.5-cycle increase in CAS latency can impact throughput by up to 10%.

Non-Volatile Memory

Non-volatile memories retain their contents when power is removed — making them ideal for configuration settings, firmware, and data that must survive system resets. They are typically slower than volatile memory and require more complex read/write procedures. The most common non-volatile memories found in embedded systems hardware are:

  • Flash memory (NAND and NOR)
  • EEPROM
  • SD cards

Flash Memory

Flash memory is the most commonly used non-volatile memory in embedded systems for its durability and high erase cycle count. Microcontrollers typically integrate on-chip flash for program storage. Flash is sector/block- erasable — one block is erased at a time, moving each bit to state '1'; writes change bits from '1' to '0'.

Two types of external flash are available:

NAND Flash — Read and written in blocks; primarily used in USB drives and SSDs. Core cells are connected in series (8 or 16 cells). NAND offers higher density, better cost ratio, and up to 10× higher endurance than NOR. Typical interface: SPI.

NOR Flash — Core cells connected in parallel (common ground). Supports random access, making it suitable for Execute-in-Place (XIP) code storage.

EEPROM – Electrically Erasable Programmable Read Only Memory

EEPROM supports byte-level erase and programming — unlike Flash which requires block erases. Power consumption is very low. Common interfaces: SPI and I2C.

SD Cards – Secure Digital Cards

SD cards are non-volatile storage commonly used in portable devices. An internal processor handles interface complexity, error correction, and wear levelling. SD cards are also used as boot devices in high-performance embedded systems. Interface modes: SD and SPI.

Memory Optimization Embedded Design Considerations

Selecting suitable memory is a critical step in embedded product design — system performance limitations are often determined by the memory architecture. Effective memory optimization embedded system design requires matching memory technology, capacity, speed, and interface to the application profile. This embedded system memory selection guide recommends evaluating the following factors:

  • Speed
  • Data storage size and capacity
  • Bus width
  • Latency
  • Power consumption
  • Cost

SRAMs are suited to lower-end systems due to lower density; SDRAMs serve complex high-performance systems. For memory optimization embedded designs, DDR2 modules offer 256 MB to 4 GB capacity in FBGA packages — enabling high density in small footprints with improved electrical properties. DDR2 operates at 1.8 V (vs DDR's 2.5 V) for lower power consumption.

DDR variants are tuned for specific use cases: GDDR (Graphic DDR) targets high-performance video applications at 2.0 V; MDDR (Mobile DDR) targets ultra-low-power handheld devices, drawing as little as 10 μA in deep power-down mode. Bus width also directly impacts transfer rate — a 32-bit memory bus fetches twice the data per cycle versus a 16-bit bus, provided the SoC supports the wider interface.

For memory optimization embedded products, the data rates defined by CAS latency and RAS-to-CAS delay are critical. Even a 0.5-cycle latency increase can change throughput by up to 10%.

Evaluating Memory for an Embedded Systems Development Board

When prototyping on an embedded systems development board, memory evaluation should mirror the production target as closely as possible. An embedded systems development board enables validation of DDR timing parameters, NAND wear levelling, and EEPROM write endurance under real software load — before committing to the final BOM.

When choosing non-volatile programmable storage, also consider the programming model: ISP (In-System Programming) halts the application during flash programming, while IAP (In-Application Programming) allows re-programming while firmware runs — suitable for field updates. Most modern microcontrollers support both.

Though memory controllers available in the SoC primarily dictate final device selection, this embedded system memory selection guide provides a solid foundation across DDR, SRAM, Flash, and EEPROM technologies. In the next blog, we will analyze power supply design in embedded systems.

Related Pages

EDGE COMPUTING SERVICES

Embien's edge computing services leverage optimized embedded systems hardware and memory architectures to deliver real-time processing at the edge.

Read More

EMBEDDED APPLICATION DEVELOPMENT SERVICES

From embedded system memory selection guide principles to firmware — Embien provides end-to-end embedded application development across Flash, SRAM, and DDR platforms.

Read More

UCLINUX POWERED MICROSEMI SMARTFUSION2 SOC FPGA XMC SYSTEM

Explore how Embien applied embedded systems hardware expertise and memory optimization embedded techniques on a Microsemi SmartFusion2 SoC FPGA platform.

Read More

Subscribe to our Blog