Learn about non-volatile memory types, their data retention properties, and applications in computing and embedded systems.
Turning off the phone, the photos remain. The space that stores them is a non-volatile memory: a type of memory that retains data even without power, unlike RAM, which loses it immediately. It is the basis of USB flash drives, memory cards, solid-state drives, microcontroller programs, and device configuration parameters [1][2][3][4].
A non-volatile memory stores information in a physical property that does not require energy to persist: an electric charge trapped in an insulator, the direction of magnetization, the phase of a material, a physical connection broken or maintained. This property is modified during writing and read by a sensor, with low read energy [1][2][3].
- Mask ROM: data are fixed at the factory during manufacturing; not modifiable.
- PROM and OTP: programmable only once, by blowing fuses or antifuses.
- EPROM: electrically programmable and erasable with ultraviolet light; now obsolete.
- EEPROM: electrically erasable, usually byte by byte; used for small amounts of data frequently modified (configuration parameters). Typical write cycles $10^{5}$-$10^{6}$.
- Flash memory (NOR and NAND): block erasure, high density and low cost; it is the dominant technology for large amounts of data.
- Emerging memories: FRAM (ferroelectric), MRAM (magnetoresistive), PCM (phase-change), ReRAM (resistive), which offer fast writing and high endurance, with growing density and costs [1][2][3][4].
Flash memory and EEPROM use a MOS transistor with a second, floating gate, completely surrounded by insulating oxide and placed between the control gate and the channel. Electrons trapped on the floating gate change the transistor’s threshold voltage: when charged the threshold is high, and at an intermediate read voltage the transistor does not conduct (bit $0$); without charge it conducts (bit $1$). To write, electrons are injected into the floating gate by tunneling through the oxide or by hot electrons, applying high voltages (from $10$ to $20\ \mathrm{V}$, generated by an internal converter); to erase, they are extracted. Electrons remain trapped for years because the oxide is a very good insulator [1][2][3].
- Data retention: the time during which data are preserved without power (typically $10$-$20$ years at room temperature, less at elevated temperatures).
- Endurance: number of write and erase cycles before oxide degradation, from $10^{3}$ for NAND flash with multiple bits per cell to $10^{14}$ for FRAM.
- Speed of reading, writing, and erasing, generally very asymmetric: reading is fast, writing and especially erasing are slow.
- Density and cost per bit, and power consumption [1][2][3][4].
Ideal models of permanent and infinite memory do not apply: each write consumes part of the cell's lifespan, and data degrades over time, with temperature, and with repeated reads. Flash memory controllers use error correction (ECC), wear leveling, and defective block replacement to extend lifespan. Some memories, like EEPROM and flash, do not allow rewriting a single bit without first erasing a block. A power interruption during writing can damage data.
A flash memory unit of $256\ \mathrm{GB}$ with three-bit cells, lifespan of $1000$ cycles, write amplification factor $2$ (assumed values).
1. Writable data over the entire lifespan (TBW): $256\ \mathrm{GB}\cdot1000/2 = 128\ \mathrm{TB}$.
2. With $50\ \mathrm{GB}$ written per day: $128\,000/50 = 2560$ days, about $7$ years.
3. An EEPROM with a lifespan of $10^{6}$ cycles, updated once per second, lasts $10^{6}\ \mathrm{s} = 11.6$ days on the same address: for this reason, frequently changing data is distributed cyclically over multiple addresses.
4. With distribution over $100$ addresses, the lifespan increases to about $3.2$ years.
5. A FRAM with a lifespan of $10^{12}$ cycles updated at the same frequency lasts over $31\,000$ years, and writing is practically unlimited.
Non-volatile memories are used as firmware and programs in microcontrollers and devices, for storage in phones, computers, and cameras (SSD, SD cards, USB), for storing calibration parameters and configurations, in meters and data loggers, in automobiles and industrial equipment.
[1] Wikipedia (it): Memoria non volatile
[2] Wikipedia (en): Non-volatile memory
[3] Wikipedia (de): Nichtflüchtiger Speicher
[4] Wikipedia (fr): Mémoire non volatile
Generating summary…