4

Using any type of controller, I flash my code on the targets flash(ROM). My question is, how is it called Read Only Memory(ROM) yet I have the ability to write on it every time I flash. Any help?

Clifford
  • 88,407
  • 13
  • 85
  • 165
YaserM
  • 185
  • 2
  • 9
  • 2
    Flashing is not considered a normal write operation (just like formatting a hard disk is not considered file system access). – Thilo Feb 29 '16 at 09:20
  • 2
    Think about it - a ROM has to be "written" at least once, otherwise it would be useless. It's not a conventional write however (and the method of "writing" depends on the exact type of ROM). For most of its life the device is essentially read-only. – Paul R Feb 29 '16 at 09:22
  • @PaulR: "writable at least once". These days, yes. But I guess in the olden days there really was non-programmable ROM that was really hard-wired to the contents you wanted. – Thilo Feb 29 '16 at 09:31
  • @ThilO: well I'm using "write" in the broadest sense here, so whether it's fusing links, or etching a mask onto a metal oxide layer, or performing some sort of special write cycle (flash, EEPROM, etc), or some other process, it's still writing in the sense that the data has to get into the ROM device *somehow*. – Paul R Feb 29 '16 at 09:41
  • @PaulR: I wouldn't call mask ROM "writable" (and your definition is not commonly accepted). Because that is done during silicon production and part of the normal manufacturing process (mostly). Writing implies a completed die gets specific data once finished. This can be laser-writing (burning bridges on the die) or any other modificaton to the data matrix lateron. – too honest for this site Mar 01 '16 at 01:45
  • 1
    Whoever close-voted this, it should not get migrated to Super User, but rather to http://electronics.stackexchange.com/. – Lundin Mar 01 '16 at 09:58

2 Answers2

10

It's not called "read only memory", at least not by any sane people. It's called "ROM", not "read only memory". The term "ROM" originated from the words "read only memory", but over time the meanings diverged.

Believing that a word's meaning should be based on the origin of the word or how it used to be used is considered a fallacy in linguistics, often called the etymological fallacy. (The people who say that there's something wrong with saying "scuba gear" or "PIN number" are committing this very same fallacy.)

At first, there really was read only memory. Over time, a very similar technology that could be programmed once was developed, and it was called "PROM" (programmable read only memory). A method was developed to erase PROM and that was called "EPROM", for "erasable" PROM. Since flash comes from that same technological line, it got the name "flash ROM", though it is not read only.

You'll notice that the term "flash ROM" is at least ten times more popular than "flash read only memory". The latter is primarily used by people who still think that the "ROM" in "flash ROM" is an abbreviation.

David Schwartz
  • 179,497
  • 17
  • 214
  • 278
  • Similarly, the term RAM, in reference to the available read/write program memory, makes even less sense, if you spell it out as the original meaning, Random Access Memory. – Lundin Feb 29 '16 at 12:03
  • @Lundin : The "random access" term refers to direct addressability of any location as opposed to sequential access. As such many ROM technologies are also random access, so the term never made much sense. The predantic soule refer to Random Access Read/Write and Random Access Read-Only memory. – Clifford Feb 29 '16 at 23:00
  • 1
    There is an evolutionary step between EPROM that was erasable by UV exposure, and EEPROM that is electrically erasable. Strictly flash is electrically-erasable, but the term EEPROM is usually used for non-flash technologies. – Clifford Feb 29 '16 at 23:15
  • Just a term we use. Just like in the USA we still say cell phone. I am sure we could come up with a zillion of them given time. ROM or PROM are often used instead of saying flash memory. Of course now we have to start saying nor flash vs nand flash depending on the conversation. having to say nor vs nand tends to go with flash and not with rom/prom. – old_timer Mar 01 '16 at 00:25
  • @Clifford: Actually Flash technologie is a derivate of UV-erasable EPROM technologie, while EEPROM means a different technology which is closer to static RAM (SRAM, larger cells). The classical EEPROM is still available in serial devices (e.g. 24C64, etc.), while integrated EEPROM typlically now uses Flash technology and additional hardware to allow smaller erase/write blocks similar to true EEPROM for cost reasons. This is not to be confused with integrated Flash which often uses less durable (erase/write cycles) cells. – too honest for this site Mar 01 '16 at 00:36
  • @Olaf : All valid clarification, especially regarding the lower quality (and presumably higher density) flash often on MCUs. It is Wikipedia that refers to flash as "electrically-erasable", which it is, and then uses the term "EEPROM" which is probably confusing to the reader, as it is not a term you or I would generally use in this context. – Clifford Mar 01 '16 at 08:09
  • @Olaf : Actually my recollection is flawed; the Wikipedia article does not say that flash is a type of EEPROM, rather that it was *"developed from EEPROM"*, which is not quite so emphatic. – Clifford Mar 01 '16 at 08:15
  • @dwelch : Yes; context is everything. When an MCU is executing code from ROM, it seldom matters what particular ROM technology is used at runtime, so the term ROM applies. – Clifford Mar 01 '16 at 08:19
  • @Clifford: Indeed, the namings are more confusing now than ever. Wikipedia is far from being perfect (some articles seem to get worse over time). EEPROM is the older technology. One good thing with old databooks is they included much more details about the processes and deeper information. I remember an old Hitachi (IIRC) memory DB which contained many details about the cells (schematics, basic layout on-die, etc.) Flash is more like DRAM than "classical" EEPROM actually. – too honest for this site Mar 01 '16 at 11:40
  • @Clifford: Just check the article. It is very wrong. Starting from the anchestry to NOR-ROM being byte-eraseable. Interestingly, the German (in case you can read it) page is more correct. It states that one of the differences to EEPROM is Flash **cannot** be byte-erasable. – too honest for this site Mar 01 '16 at 12:12
1

Flash memory is a type of electrically erasable read-only memory (EEPROM), though the terms EEPROM or E2ROM are usually reserved for non-flash technologies.

NOR flash (as used in microcontroller program memory and distinct from NAND flash) is also a Read-Only Random Access Memory, the critical distinction is that erasure, and writing is not random access. Erasure is by blocks or sectors, and both writing and erasure require accessing the memory in a manner that blocks normal random access read to the entire sector (and in some cases the entire memory) for the duration of the erase/write access.

So in the memory's normal operating mode it is read-only. It is perhaps analogous to a re-writeable CD-ROM for example

It is perhaps useful to understand that most memory technologies are a compromise of a number of possible attributes that often appear in combination and make simple categorisation impossible, a particular memory may exhibit one or more of the following attributes for example - they are not all mutually exclusive:

  • Read-only
  • Random-access (addressable)
  • sequential access.
  • Read/write
  • Non-volatile
  • Volatile
  • Re-writeable
  • One-time programmable (OTP)
  • Static
  • Dynamic

NOR flash memory for example is read-only, random-access, re-writeable, an non-volatile.

Clifford
  • 88,407
  • 13
  • 85
  • 165