Electronic – Is the ROM of an MCU NAND FLASH

eepromflashmicrocontrollernandrom;

I understand binary code is stored in the ROM area of an MCU. Typically most MCUs have FLASH EEPROMS. Is this really the NAND type FLASH storage we find in most SSDs?

If not, what are the differences?

Best Answer

No. NAND flash is unsuitable for storing code which is directly executed by a CPU. Nand flash can only be used to store code which is first copied to RAM and then executed from the RAM. There are two reasons for this: firstly NAND flash is not accessible word by word; it's accessed in blocks. Secondly, data in NAND flashes is actually quite volatile and just reading a block of data a few million times results in bit errors creeping into the data. This is not a problem for disk type access where the data is read and written not so often and can be repaired by error correction algorithms in between. But executing directly from the nand flash, a few million read cycles might take just a second or so.

If codes is directly executed from a flash chip then that chip must be a NOR flash chip. Most microcontrollers also include real ROM inside the chip, for storing bootloaders etc. This ROM is often a mask ROM which is really ROM, "Read Only Memory" meaning it cannot be written to at all by the user, it's content is fixed in the chip design using one via mask. Another alternative, instead or additionally, is PROM, Programmamble ROM which consists of transistors with weak emitters which can be burned one by one. This kind of memory bit can be written once, but not erased.

Some background info:

For executing code, all processors require storage which can be accessed on a byte by byte basis. Nowadays, most commonly this memory is the L1 cache RAM which is placed "nearest" to the processor on the (instruction) data bus. Further away from the CPU there can be other types of memory connected to many kinds of buses.