Skip to content

Technology card

Shipping

NOR Flash

NOR

Random reads, sector erasure and execute-in-place: what NOR makes convenient, and what firmware updates still have to handle.

Glossary entry on hesela.dev · JSON record · Execute-in-place · EEPROM · EEPROM emulation

On this page6 sections

In one minute

NOR flash is non-volatile memory that supports fine-grained random reads, commonly used to hold firmware and, with a compatible memory path, execute code in place.

Treat read access and modification as separate contracts. NOR can provide byte or word reads, while programming and erasure operate under different rules. Infineon's FAQ describes programming from erased 1 bits toward 0 and restoring bits through sector or chip erase. A byte-readable address is therefore not an unrestricted byte-rewritable location. [1]

Program granularity also depends on the part: word programming and buffered or page programming are distinct interfaces. For the FL-S family discussed in Infineon's FAQ, repeated programming within one ECC unit can disable its automatic correction. The safe update unit comes from the data sheet, not merely the width of a CPU store. [1]

A subtle trap appears in the S29GL-T example: a second write may clear only data bits, yet recalculated hidden ECC parity can require a forbidden 0-to-1 transition and disable correction. Data-bit direction alone is therefore insufficient to approve repeated programming. Follow the family-specific ECC and erase rules. [1]

Execute-in-place (XIP) means fetching instructions directly from memory-mapped non-volatile storage, rather than loading those executable instructions into a separate RAM image. It does not mean that the system needs no RAM: Linux's cramfs documentation distinguishes directly mapped read-only segments from writable data copied into memory. Directly executed segments must be uncompressed and suitably aligned; this need not apply to the entire filesystem image. [3]

Serial NOR can support this execution path through a compatible memory controller. ST's AN4760 describes STM32 QUADSPI memory-mapped mode for reads and code execution, while indirect mode handles commands such as programming and erasing. Instruction, address, dummy-cycle and data settings must match the flash device. Caching and prefetch affect execution performance. [2]

The serial flash's continuous-read mode and the processor's XIP capability are related but different. AN4760's SIOO option reduces repeated command overhead when both sides support it; it is not the definition of XIP. Qualify the actual processor, controller and flash combination, including what happens when an update competes with instruction fetches. [2]

Standalone EEPROM and raw NOR expose different update contracts. EEPROM is useful for frequently revised configuration; EEPROM emulation instead supplies a variable-update interface through software over flash. The emulation must manage records and reclaim erase units. It does not turn NOR into freely overwritable RAM. [5]

A derived address example illustrates the 24LC256 rule: a four-byte page write from 0x003E targets 0x003E, 0x003F, 0x0000, 0x0001. Split it into two two-byte writes at 0x003E and 0x0040, waiting for completion between commands. A payload below 64 bytes can still cross a page boundary. [4]

Check completion and contents separately. For an accepted, unprotected write on this family, STOP starts the internal write cycle; ACK polling then tests readiness. Write protection can nevertheless acknowledge a command without storing it. A successful bus exchange is therefore insufficient evidence that configuration changed. On the 24XX256, WP is sampled at STOP; asserting it afterward does not cancel a write cycle already started. [4]

On the STM32 devices covered by AN4894, hardware ECC is not a reliable detector of interrupted programming or erasure. The emulation driver checks each variable record with a CRC and uses recovery logic; correction hardware alone is insufficient. This is an implementation-specific recovery design, not a guarantee that every interrupted update survives. [6]

Flash emulation trades a component for reserved capacity and software work. ST's implementation copies valid variable records into another page set before erasing the old one. Recovery is implementation-specific; a variable API alone promises neither fixed update latency nor an atomic multi-variable transaction. [5]

AN4894 describes recovery of the latest valid variable value, which may precede the interrupted update. If power loss or reset interrupts the first write to that virtual address, the driver considers it to have no stored value. Application startup must handle that missing-value case; recovery is not a promise to complete the attempted update. [6]

Compared to neighbors

Firmware code placement and flash-update design answer different questions. Plan both before selecting a device.

Separate access contracts; exact widths and command limits are part-specific.
OperationEngineering check
ReadAddress mapping and access latency
ProgramAllowed update unit and ECC rules
EraseSector layout and data preservation

Uncertainty notes

  • Automatic-ECC restrictions cited here concern the named Infineon families, not every NOR device. AN4760 describes STM32 QUADSPI behavior rather than a universal controller specification.
  • The 64-byte boundary, write-protect behavior and acknowledgment example concern Microchip 24XX256. The address sequence is derived from its documented wrapping rule, not measured on hardware. EEPROM emulation describes a software technique, not a universal recovery guarantee.

Sources

  1. 01Infineon - NOR Flash FAQs, questions 2, 4, 9-10, 31, 36-39 and 57 · accessed 2026-10-18
  2. 02STMicroelectronics - AN4760 Rev 5, sections 3.3-3.4: QUADSPI modes and execution · accessed 2026-10-18
  3. 03Linux kernel documentation - Cramfs: memory-mapped image and execute-in-place · accessed 2026-10-18
  4. 04Microchip - DS20001203Y (2022), sections 6-7, pages 11-12: 24XX256 page writes and acknowledge polling · accessed 2026-10-20
  5. 05STMicroelectronics - AN4894 Rev 12 (July 2026), Implementing EEPROM emulation; official HTML convenience edition · accessed 2026-10-20
  6. 06STMicroelectronics - AN4894 Rev 12, Data recovery: interrupted first writes and previous valid values · accessed 2026-10-20

Published by Hesela team

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. NOR Flash. Hesela. https://hesela.com/tech/nor-flash/