# What are the differences between NAND and NOR flash?

What are the differences and where would your use each?

-

There is a lot of trade-off to it.

Wikipedia also:

Despite the additional transistors, the reduction in ground wires and bit lines allows a denser layout and greater storage capacity per chip. In addition, NAND flash is typically permitted to contain a certain number of faults (NOR flash, as is used for a BIOS ROM, is expected to be fault-free). Manufacturers try to maximize the amount of usable storage by shrinking the size of the transistor below the size where they can be made reliably, to the size where further reductions would increase the number of faults faster than it would increase the total storage available.

So, NOR flash can address easier, but is not even close to as dense.

If you take at a look at a pretty decent comparison PDF.

NOR has lower standyby power, is easy for code execution and has a high read speed.

NAND has much lower active power(writing bits is faster and lower cost), higher write speed(by a lot), much higher capacity, much much lower cost per bit and is very easy for file storage use. due to it's lower read speed when using it for code execution you really need to ghost it to ram.

To quote a small section with a great table above it...

The characteristics of NAND Flash are: high density, medium read speed, high write speed, high erase speed, and an indirect or I/O like access. The characteristics of NOR Flash are lower density, high read speed, slow write speed, slow erase speed, and a random access interface.

-

NAND flash is cheaper, so you want to use it if you can. The drawback is that it's not as reliable. NAND flash is faster at most operations, with the notable exception being small random access reads. If you want to read a couple bytes from a random address in memory, NOR is faster. For large memory reads, NAND does reasonably well, and actually beats NOR for large enough chunks.

Most embedded operating systems include code to correct the errors in NAND Flash. There are also microcontrollers with hardware error correction. The real problem happens at boot time-- first-level bootloaders don't have error-correcting code, and they haven't configured the memory controller to run hardware ECC yet. It's a bit of a chicken-and-egg problem-- you can't load the ECC code without errors because you haven't loaded the ECC code yet.

To get around this problem, some memory manufacturers will specify a certain region of the chip that is guaranteed to be error free (the first 4 kB, or something like that). You put a bootloader with software ECC there (like U-boot), read it out with no errors, and then use it to read out your OS kernel, correcting errors as you go. You can also store a bootloader in a serial flash, and just use NAND flash for large stuff like an OS kernel or filesystem.

I've found this Atmel application note useful: http://www.atmel.com/dyn/resources/prod_documents/doc6255.pdf

-
One consequence of the lower reliability of NAND flash is that while NAND flash devices allow random reads of individual bytes (with a little setup time), it's not really possible to read less than a page unless one includes error-correcting information in smaller chunks (e.g. one could write each byte as 16 bits and be able to detect all single- and double-bit errors, at the cost of only being able to store half as much information). –  supercat Mar 2 '11 at 20:29

NOR allows for random access, but NAND does not (page access only.)

From Wikipedia:

NOR and NAND flash get their names from the structure of the
interconnections between memory cells. In NOR flash, cells
are connected in parallel to the bitlines, allowing cells to
be read and programmed individually. The parallel connection
of cells resembles the parallel connection of transistors in
a CMOS NOR gate. In NAND flash, cells are connected in series,
resembling a NAND gate. The series connections consume less
space than parallel ones, reducing the cost of NAND flash. It
does not, by itself, prevent NAND cells from being read and
programmed individually.

-