Introduction
Flash is a type of memory chip used in electronics and semiconductors, commonly called flash memory. It combines characteristics of ROM and RAM, and supports electrically erasable and programmable operations (EEPROM). Flash can be erased or written multiple times during operation and allows fast data reads similar to RAM, so data is retained after power is removed.
Flash is non-volatile storage and can retain data for a long time without a power supply, making its storage characteristics comparable to a hard drive. With the growth of big data, artificial intelligence, and the Internet of Things, flash technology has developed rapidly compared with many other computing technologies.
Flash is divided into two types based on internal architecture: NOR Flash and NAND Flash. NOR Flash generally offers smaller capacities and is mainly used for code storage. NAND Flash provides larger capacity and is used for data storage, for example in memory cards used by digital cameras.
NAND Flash Overview
NAND Flash was introduced by Toshiba in 1989. It uses a linear macrocell architecture. A block typically includes 32, 64, or 128 pages. Page sizes commonly are 512 B, 2 KB, or 4 KB. Each page contains a data area and an out-of-band (OOB) area. The data area stores user data, while the OOB area stores ECC (error correcting codes), address mapping information, and other management metadata. OOB sizes commonly include 512 B, 32 B, 2 KB, 64 B, 4 KB, or 128 B. NAND Flash emphasizes lower cost per bit and higher overall capacity, and it can be upgraded through interfaces similarly to disk storage. NAND Flash does not support random-byte memory-style reads; reads are performed by page, typically 512 bytes or larger, and its architecture provides a cost-effective solution for large-capacity solid-state storage.
Key characteristics of NAND Flash:
1) NAND Flash performs read and program operations by page. A page is typically 256 B or 512 B, so NAND is not normally used to execute code directly; code is usually loaded into RAM before execution. Erase operations are performed by block; a block might be 4 KB, 8 KB, or 16 KB. NAND supports fast program and fast erase, with block erase times around 2 ms, compared with NOR erase times of several hundred ms.
2) Data and address use the same bus for multiplexed I/O, enabling serial access. Random-byte reads are slow and byte-level random programming is not supported.
3) Small chip size and low cost.
4) Chips contain bad blocks; the number can range from about 3 to 35 depending on memory density. Bad blocks do not affect the performance of good blocks, but designers must mark bad blocks in the address mapping table.
From the cell perspective, NAND Flash is available as SLC (Single Level Cell) and MLC (Multi-Level Cell). SLC typically has higher cost, lower capacity, and faster speed; MLC offers higher capacity and lower cost but slower speed. Because MLC stores more levels per cell, it has increased complexity and a higher error rate, so error correction is required, which reduces performance relative to SLC. In practice, choose the Flash type based on application requirements. NAND Flash has large capacity and fast rewrite speed, making it suitable for bulk data storage, and it is widely used in devices such as mobile phones, digital cameras, and USB flash drives.
NOR Flash Overview
NOR Flash was developed by Intel in 1988. NOR technology, also called linear technology, evolved from traditional EEPROMs. NOR Flash supports execute-in-place (XIP); its random read access is similar to common SRAM, and memory cells are organized in a block sequence that allows byte-level access. NOR uses parallel connections with separate control, address, and data lines, providing fast read speeds. Systems can execute code directly from NOR Flash, reducing required SRAM and lowering cost. NOR is cost-effective for small capacities in the 1–4 MB range, so small-capacity storage often uses NOR Flash. However, NOR write and erase operations are relatively slow, capacity is limited, and cost is higher, so NOR is mainly used for code storage in phones, BIOS chips, and embedded systems.
Key characteristics of NOR Flash:
1) Program and data can reside on the same chip. With dedicated address and data buses, NOR supports fast random reads and allows systems to execute code directly from Flash without first copying it to RAM.
2) NOR can program single bytes or single words, but it cannot erase single bytes; erasure must be by block or by the entire chip. Because NOR erase and program speeds are slower, NOR is less suited for pure data storage and file-system usage.
Differences Between NAND and NOR Flash
1. Boot behavior
On some development boards, at power-up NAND Flash contents are first copied from NAND Flash into on-chip SRAM (for example the first 4 KB), and the CPU then starts executing from SRAM address 0. Users cannot execute code directly from NAND Flash, so many boards that use NAND also include a small NOR Flash to run boot code. NOR Flash supports direct execution from address 0, and the CPU can start executing directly from NOR Flash.
2. Interface differences
NAND Flash uses a multiplexed I/O interface that transfers control, address, and data over shared pins, typically using an 8-bit or 16-bit data interface. Read and write operations operate on pages (commonly 512 bytes), similar to hard-disk block operations, which allows NAND-based storage to replace disks or other block devices in some applications.
NOR Flash typically has an SRAM-like parallel interface that connects to the CPU address and data buses with relatively low interface requirements. NOR has enough address pins to access each byte directly, providing easy byte-level access. However, different NOR capacities require different numbers of address pins, so upgrading NOR capacity in hardware is less convenient.
3. Performance comparison
Both NAND and NOR are non-volatile and support block erase and reprogramming. Writes can only occur to empty or erased cells, so most write operations require an erase first. Performance differences include:
1) For read operations, NAND requires multiple address cycles before data access, while NOR allows direct data access; therefore NOR read speed is generally faster than NAND.
2) NAND erase operations are simpler and NAND erase units are smaller, requiring fewer erase circuits. Consequently, NAND erase is much faster than NOR erase.
3) NAND write units are smaller and write speeds are faster than NOR.
4. Capacity and cost
NAND cell sizes are roughly half that of NOR cells. Because NAND production processes are simpler, NAND can provide higher capacity per die size, so NAND devices are lower cost than NOR for the same capacity.
5. Power consumption
NOR Flash typically requires more current during initial power-up than NAND. However, NOR standby current is much lower than NAND. Instantaneous active power is similar for both, so effective power consumption depends on the duration of memory activity. NOR is advantageous for random reads, while NAND consumes less power for erase, program, and sequential read operations.
6. Endurance
The article states that NAND Flash supports up to one million block erase cycles per block, while NOR supports around one hundred thousand erase cycles. NAND typically has an endurance advantage in block erase cycles and smaller typical block sizes, which can result in higher durability for NAND in some workloads.
7. Reliability
Bit flips occur more frequently in NAND than in NOR. This is critical when Flash stores important files, so when using NAND Flash, error detection and correction (EDC/ECC) algorithms are recommended to improve reliability.
Bad blocks in NAND are randomly distributed and require an initialization scan to identify and mark them as unusable. Failure to properly handle bad blocks can lead to high failure rates. Bad block issues do not occur in the same way with NOR Flash.
8. Software support
Software support should distinguish basic read/write/erase operations from higher-level disk emulation and flash management software, including performance optimizations. Running code from NOR devices requires little software support. Running similar operations on NAND typically requires device drivers, such as memory technology device (MTD) drivers; both NAND and NOR require MTD for write and erase operations.
NOR devices generally need fewer MTD resources, and vendors provide higher-level software for NOR, including drivers such as TrueFFS that have been adopted by system vendors.
9. Other functions
Drivers also provide disk-on-chip emulation and NAND flash management features, including error correction, bad block management, and wear leveling.
What Is SPI NAND Flash
In embedded systems, NOR and NAND Flash have long been common. Early NOR Flash used a parallel interface, with separate data and address pins. However, different capacities required different pin counts, and parallel NOR packages are large and consume significant PCB area. Parallel NOR was gradually replaced by SPI (serial) NOR Flash.
SPI NOR Flash enables pin-compatible packages across capacities and uses smaller packages (for example SOP8), quickly superseding parallel NOR in the market. As a result, many people now refer to NOR Flash as SPI Flash.
NAND Flash traditionally multiplexes address and data lines and standardized interface widths (x8 or x16), so capacity compatibility was not a major issue and this package and interface style persisted for years. Recently, driven by device miniaturization and cost pressures, SPI NAND Flash has begun to gain traction.
With SPI NAND, a microcontroller can use a standard SPI interface rather than a traditional NAND controller, and the NAND vendor can include built-in ECC. This reduces cost for the host MCU and eliminates the need for host-based hardware or software ECC.
SPI NAND packages often use WSON or TF BGA, which are significantly smaller than traditional NAND TSOP packages and save PCB area. Fewer pins reduce PCB complexity and layer count, meeting miniaturization requirements and reducing product cost.
1. SPI NAND vs SPI NOR
SPI NAND and SPI NOR are both called SPI Flash because they use SPI communication. The fundamental differences between NAND and NOR remain the same: NOR behaves like memory and is typically used to store and execute program code directly from Flash; NAND is optimized for high-capacity data storage. SLC NAND accessed via SPI offers reliability and endurance advantages compared with some other high-density NAND types, while keeping pin count and package size small, which is increasingly in demand in embedded systems.
2. SPI NAND applications
As electronic devices become more feature-rich, compact systems increasingly require embedded operating systems and larger storage capacities. NAND typically has faster write speeds and better stability under frequent erase/write cycles. SPI NAND is becoming common in smart wearables, set-top boxes, routers, PON and network modules, IoT devices, and automotive applications.
Market Applications
NAND Flash applications
NAND Flash products include USB flash drives, memory cards, SSDs (solid-state drives), and embedded storage (eMMC, eMCP, UFS). USB is common portable storage; memory cards are used as peripheral storage in devices such as cameras and dashcams.
SSDs are used in personal computers and servers. As SSD prices have fallen and data-center demands have grown, SSD-driven NAND demand has increased rapidly.
Embedded storage is another major NAND application. Embedded storage packages combine NAND Flash with a controller that uses specific communication protocols to improve data transfer speed and reliability. Embedded NAND is widely used in phones, tablets, gaming consoles, and automotive electronics. Mobile devices commonly use eMMC or eMCP solutions, analogous to a computer's CPU, DRAM, and disk but packaged differently for mobile form factors.
NOR Flash applications
Embedded storage is the main application area for NOR Flash. Because NOR offers fast random reads, high reliability, and execute-in-place capability, it is often used to store small amounts of code, firmware, and operating-system images.
Recent growth in the NOR market has been driven by automotive electronics, IoT, 5G, and smart devices such as TWS earphones and wearables. As smart products require more firmware and code, designers often add one or more external NOR Flash chips to store additional code.
Typical NOR application scenarios include:
1) Smartphones and peripheral devices: OLED displays and other modules often need compensation algorithms and drivers stored in Flash. TDDI displays and under-display fingerprint modules also require Flash to store their drivers and algorithms.
2) Internet of Things: With high-density 5G base-station deployment and pervasive connectivity, IoT nodes are proliferating and many of these devices include NOR Flash. For example, modern TWS earphones often include two NOR Flash chips.
3) Automotive: From small cameras to advanced driver-assistance systems (ADAS), automotive subsystems with substantial code volumes use external NOR Flash. Instrument clusters often rely on NOR Flash for fast boot.
4) Industrial: For example, modern smart meters may use NOR Flash to extend data storage life, replacing ferroelectric memory.
5) 5G and communications equipment: 5G base stations and microcells have spawned many node devices. 5G also accelerates industrial IoT, vehicle networking, autonomous driving, and edge computing, all of which rely on NOR Flash in various subsystems.
Choosing the Right Memory
Selecting the appropriate memory type for an electronic product can be challenging. Engineers can use the following guidance when choosing a memory:
- Define operating conditions, for example expected erase/write cycles.
- Consider environmental factors such as temperature, vibration, and radiation.
- Determine data-loading requirements.
- Record the minimum, required, and maximum bit rates at which the memory must operate in the application.
- Choose a memory interface type that best matches the required bit rate.
- For automotive or aerospace systems and other harsh environments, select memory qualified for automotive use or with adequate radiation tolerance.
- Use a breakout board to connect candidate memory devices to a microcontroller development kit and test performance.
There are many non-volatile memory options for storing application code, configuration data, and other information. Engineers should carefully evaluate application requirements and choose a Flash device that balances performance and cost.