When searching in Google about MRAM I was only able to find the reading and writing process for MRAM. How does erasing happen in MRAM? Also why there is no need of error correction and checking algorithm in MRAM?

  • 1
    \$\begingroup\$ Dis you consult the relevant datasheet? \$\endgroup\$ – Chetan Bhargava Feb 11 '13 at 5:22
  • \$\begingroup\$ I'm not sure enough to post as an answer, but I believe like RAM it's byte addressable and has no endurance converns so you can just write zeros (or whatever else) to erase it just like you do with RAM. \$\endgroup\$ – PeterJ Feb 11 '13 at 5:30
  • \$\begingroup\$ What @PeterJ says is absolutely possible. However, there might be a single erase instruction which would be faster. \$\endgroup\$ – user17592 Feb 11 '13 at 6:28

Writing is functionally equivalent to erasing.

Depending on the physical construction, writing may actually be a two step process, where the first step resets the memory to a "cleared" state, and the second step "sets" some of the bits.
Whether the state of a "cleared" bit is 0b11111111 or 0b00000000 is dependent on the specifics of the hardware.

Some memory, like flash, can only erase large sections of memory at once, so the process for "writing" to a byte may actually involve reading, and then storing a large section (It can be upwards of 512 bytes! This is called the "Page size"), and then updating the stored data (which is likely held in SRAM) with the new value, and then writing the updated data back to the page.

Anyways, from an IC-level perspective, this is largely irrelevant -
To "erase" something in the MRAM, you simply overwrite it with a new value.
If you want to make the erase option a separate step, simply write 0b00000000 or 0b11111111.

  • \$\begingroup\$ You might want to address the ECC aspect--that, like NOR Flash, MRAM is more resilient than NAND Flash (a trade-off with density), I seem to recall reading that even reads can risk disturbing some NAND Flash. I think MRAM is also less vulnerable to radiation single-event-upsets (which--plus working as single universal memory, persistent and random access read-write, thus reducing weight and possibly failure modes--makes it more attractive for aerospace applications). \$\endgroup\$ – Paul A. Clayton Feb 12 '13 at 17:01
  • \$\begingroup\$ On large-block flash devices, writing a byte would not generally require reading, updating, erasing, and rewriting such a large section. More typically, data would be subdivided into relocatable pages of around 512 bytes which would be read or written as a unit. When a page is written, the system finds a blank page, writes the page there, makes note of its new location, and marks the old page as having been superceded. If no blank pages are available, it may be necessary to copy data out of a block and erase it, but one can choose for that purpose a block whose pages have mostly... \$\endgroup\$ – supercat Feb 12 '13 at 17:57
  • \$\begingroup\$ ...been superceded. If one wants to avoid a long worst-case update time, one could have each page write also consider moving a block from a page that contains a lot of dead pages to a fresh block, so that by the time there were no blank pages available, there would be a block which contained nothing but superceded pages. [note: I've generally seen "page" used to refer to an area of memory that may [or in some cases must] be written as a unit, and "block" used to refer to an area of memory that must be erased as a unit. \$\endgroup\$ – supercat Feb 12 '13 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.