Sivabalan M
14. August 2025

At the heart of every intelligent device lies its memory. Storage in embedded systems is not a one-size-fits-all problem; it's a carefully balanced engineering decision that directly impacts a product's performance, cost, reliability, and functionality. The choice of storage technology dictates how a device boots, where it stores its programming, how it logs critical data, and how it retains its identity when the power is off.

An embedded system typically has three distinct storage requirements:

  1. Code Storage: The non-volatile memory that holds the application firmware. The processor must be able to read this memory quickly to execute the program.
  2. Configuration Storage: A space to store essential parameters that must survive a power cycle, such as device settings, network credentials, and factory calibration data.
  3. Data Storage: Memory used for logging large amounts of data, such as sensor readings, user files, media, or event logs. This often requires high capacity and fast write speeds.

To meet these varied needs, embedded engineers have a powerful arsenal of storage technologies at their disposal. In this article, we'll dive into the most common options—Internal Flash, NOR Flash, NAND Flash, and SD Cards—to understand their strengths, weaknesses, and ideal use cases.


Embedded Storage Devices
Embedded Storage Devices

Internal Flash: The On-Chip Workhorse

Nearly every modern microcontroller (MCU) comes with a block of on-chip, non-volatile memory known as Internal Flash. This memory is directly connected to the processor's bus, making it the fastest and most convenient place to store and execute firmware.

  • How it works: Internal Flash is integrated into the same silicon die as the CPU. When you program an MCU, you are writing your compiled code directly into this memory. Because of its tight integration, the processor can fetch and execute instructions from it at full speed, a concept often referred to as Execute-in-Place (XIP).
  • Key Characteristics:
  • Speed: Extremely fast read access, enabling direct code execution.
  • Convenience: No external components or wiring needed.
  • Limitation: It is typically limited in size (from a few kilobytes to a few megabytes) and has a finite number of erase/write cycles. While perfect for firmware that doesn't change often, it's not suitable for high-frequency data logging.
  • Primary Use: The default choice for code storage in the vast majority of embedded applications.


NOR Flash: The Reliable Executor

When an application's code size exceeds the MCU's internal flash, or when higher reliability is required, developers turn to external NOR Flash.

  • How it works: NOR Flash is an external memory chip that connects to the MCU, typically via an SPI, QSPI, or parallel interface. Its internal architecture is similar to Internal Flash, allowing for random access to any memory location. This means it also supports Execute-in-Place (XIP), allowing the MCU to run code directly from the external chip.
  • Key Characteristics:
  • Fast Reads: Excellent for code execution.
  • High Reliability: Known for its data retention and endurance.
  • Byte-Addressable: You can read individual bytes, making it simple to work with.
  • Trade-offs: Erase and write operations are relatively slow, and it has a higher cost-per-megabyte compared to NAND Flash.
  • Primary Use: Storing bootloaders, reliable firmware storage for larger applications, and holding critical configuration data.


NAND Flash: The High-Capacity Data Store

For applications that need to store large amounts of data—think of a digital camera storing photos, a GPS device storing maps, or an industrial machine logging gigabytes of operational data—NAND Flash is the dominant technology.

  • How it works: NAND Flash has a fundamentally different architecture from NOR. It is accessed in "pages" and "blocks" rather than individual bytes. You cannot execute code directly from NAND Flash (no XIP). To use the data, a block must first be read from the NAND into the MCU's RAM.
  • Key Characteristics:
  • High Density & Low Cost: Offers much higher storage capacities at a lower cost per megabyte than NOR Flash.
  • Fast Writes & Erases: Significantly faster at writing and erasing large blocks of data.
  • Complexity: NAND Flash is not perfect. It has a known issue of "bad blocks" from the factory and is susceptible to "bit-flipping" errors. It requires sophisticated management techniques like Error Correction Code (ECC), wear leveling (to distribute writes evenly), and bad block management. These are typically handled by a software layer called a Flash Translation Layer (FTL) or a dedicated file system.
  • Primary Use: Mass data storage. It's the technology inside SSDs, USB drives, and eMMC chips.


SD Card: The Removable Storage Standard

An SD Card is essentially a self-contained storage system. It packages raw NAND Flash memory together with a dedicated microcontroller that handles all the complex management (ECC, wear leveling, etc.) internally.

  • How it works: The embedded system communicates with the SD Card using a standardized SPI or SDIO interface. The application simply reads and writes blocks of data, and the card's internal controller takes care of the rest.
  • Key Characteristics:
  • Convenience: Removable, standardized, and available in very high capacities.
  • Simplicity: The host MCU is freed from the complexities of managing raw NAND.
  • Flexibility: Ideal for user-accessible storage, firmware updates, or transferring large log files.
  • Trade-offs: The physical connector can be a point of failure, and performance can be lower than a directly-wired flash chip.
  • Primary Use: User data storage, data logging for offline analysis, and a simple mechanism for field updates.


The Portability Problem and the HAL Solution

Interfacing with these storage devices is a complex task. The commands to read, write, and erase a NOR Flash chip over a QSPI interface are different from the commands to initialize an SD Card in SPI mode. Furthermore, these interfaces are implemented differently by every silicon vendor. This creates a significant software challenge, locking firmware to specific hardware combinations.

A Hardware Abstraction Layer (HAL) solves this by providing a standardized block-level API. Your application doesn't need to know if it's talking to an SD Card or a NAND Flash chip managed by an FTL. It simply calls functions like rs_hal_storage_read_block() or rs-hal_storage_write_block(). The HAL, in conjunction with file systems and drivers, handles the underlying complexity and vendor-specific implementations.


Conclusion: Build on a Solid Foundation with RAPIDSEA

Choosing the right storage in embedded systems is a critical design decision. From the high-speed execution of Internal Flash and NOR Flash to the high-capacity data storage of NAND Flash and SD Cards, each technology has its place.

Navigating the complex driver and file system requirements for each of these technologies can consume a huge amount of development time. Our RAPIDSEA Suite provides a comprehensive and proven storage stack, including a robust HAL, drivers for various flash devices, and file system support. By building on RAPIDSEA, you abstract away the low-level hardware details, ensure portability across MCUs, and accelerate your time-to-market. Let us provide the solid foundation, so you can focus on building the innovative features of your product.

Subscribe to our Blog