Flash Memory

From SEGGER Knowledge Base
Jump to navigation Jump to search

Flash memory is an electronic non-volatile computer memory which be electrically erased and reprogrammed.

Types of flash

The two main types of flash memory, NOR flash and NAND flash, are named for the NOR and NAND logic gates. On a chip level, they both consist of floating-gate MOSFETs.

NOR flash

NOR flash is reliable and can be programmed in small units. It can be read out quickly.

NAND flash

NAND flash is not as reliable as NOR flash. It typically requires error correction. When reading it, it is typically read out on a per page basis, which a single page being 2kB, 4kB or even larger. The contents of the page have first be written to an internal (on-chip) RAM buffer, which can then be read out. This process takes some time, typically in the order of 30us. This makes NAND flashes not suitable to directly hold data or code. The NAND flash requires a controller with a "flash translation layer", which is typically implemented in software. That raises the question: Why use NAND flash? Simple answer: It is cheap. It costs a fraction of what a NOR flash with the same capacity costs.