Playing Around With MRAM

For the longest time, hardware tinkerers have only been able to play around with two types of memory. RAM, including Static RAM and Dynamic RAM, can be exceedingly fast but is volatile and loses its data when power is removed. Non-volatile memory such as EPROMS, EEPROMS, and Flash memory retains its state after power is removed, but these formats are somewhat slower.

There have always been competing technologies that sought to combine the best traits of these types of memory, but not often have they been available to hobbyists. [Majenko] got his hands on a few MRAM chips – Magneto-Resistive RAM – and decided to see what they could do.

Magneto-Resistive RAM uses tiny pairs of magnetic plates to read and write 1s and 0s. [Majenko] received a sample of four MRAM chips with an SPI bus (it might be this chip, 4 Megabits for $20, although smaller capacity chips are available for about $6). After wiring these chips up on a home-made breakout board, [Majenko] had 16 Megabits of non-volatile memory that was able to run at 40 MHz.

The result was exactly what the datasheet said: very fast write and read times, with the ability to remove power. Unlike EEPROMS that can be destroyed by repeated reading and writing, MRAM has an unlimited number of write cycles.

While MRAM may be a very young technology right now, it’s a wonderful portent of things to come. In 20 (or 30, or 40) years, it’s doubtful any computer from the largest server to the smallest microcontroller will have the artificial separation between disk space and memory. The fact that any hardware hacker is able to play around with this technology today is somewhat amazing, and we look forward to more builds using MRAM in the future.

26 thoughts on “Playing Around With MRAM

    1. It’s ferroelectric, not ferroresistive like you said.

      MRAM and FRAM are both nonvolatile but have a different means of holding their data.

      MRAM uses ferromagnetic materials and therefore are susceptible to external magnetic fields, much like hard disk drives.

      FRAM uses the polarization of a material to hold data; a layer of lead zirconium titanate (PZT) is used as the storage element. As far as I know, neither magnetic fields nor ionizing radiation will affect FRAM. It technically has a read-write limit, but it’s able to do trillions of reads and writes over its lifetime.

      @rageahol
      MSP430s don’t have an MRAM line, but they do have FRAM (see my previous statement).

  1. Very nice, but it’s hard to think of a hobbyiest use which is constrained by write time. The serial bus is the bottleneck when reading EEPROMS and 40MHz is a somewhat standard speed. When writing, having a page pre-erased ready and just appending new data speeds things up quite considerably.

    If these RAMs had a parallel interface it would be a bigger deal IMHO.

    1. Just for fun, I did the following back of the envelope calculations: say I’m writing 1 and 0’s at 40 MHz (I am guessing this could be described as complete cycles at 20 MHz), 10^6 write cycles means the chip would be burnt in 0.05 seconds…

      Definitely not much of a memory… Hello! Excuse me, sir, what’s your name again?

      Now if you look closely at the Wiki page, it actually says 10^16. Ahhhhhh… That would be close to 11 years. Much better!

  2. FRAM and MRAM are very different in the way they work.

    FRAM basically replaces the oxide in the capacitor of a DRAM like cell to achieve its non-volatility.

    MRAM introduces a new storage element in the form of a resistor (called a Magnetic Tunnel Junction or MTJ) that can be put into 2 distinct states with different resistances.

  3. Magneto Resistive RAM doesn’t actually have truly unlimited write cycles, but I wouldn’t loose any sleep over worrying about it. If you notice the literature from Ramtron or Everspin they all say “Virtually unlimited write endurance”. Last thing I read said you could do nothing but write to them for several years before a failure.

  4. FRAMs have been around for a long time, made by Ramtron. I just assumed that, since there wasn’t any competition, that they had a patent on them. I guess the patent has expired. They are pin-compatible with EEPROMs and use the same s/w, except they don’t need the write wait time. I used some in a datalogger that went in a model rocket so I could have non-volative, fast storage.

    1. yeah… same pinout. I managed to get some FRAM samples from ramtron, the i2c version, 128 kbytes, so 17 address bits… one of them lives in the i2c address byte.

      The only problem is that this high-order address bit is NOT at the same place in the i2c address byte as EEPROM chips like the 24AA1025, so they are NOT I2C-Address compatible, so that you cannot mix, say, 2 EEPROM and 2 FRAMs on the same I2C bus.

      That was quite a deception, meaning that my design would only be able to use the 4 fram samples I received, or 4 standard EE devices, but not a mixture of both.

      That’s a good thing to be aware of if you’re trying this.

  5. I really hate it when I read someone provides “virtually unlimited” something. Nothing is virtually unlimited, everything has a hard limit. The universe has a finite number of atoms and a finite size. To Nokia: my dumb cellphone does not have “virtually unlimited” SMS contacts, it’s just quite large, and I’d like to know *exactly* how large. Any company that claims to provide a “virtually unlimited” supply of anything instantly raises to me red flags.

  6. I’ve used those very MRAM chips before in a test project. I think I might like to use them in a proper thing.

    For me personally, the most appealing thing isn’t the uber fast write times or the non-volatilibility (?)…. just that it’s one of the few RAM chips that support SPI and has nice capacity. The alternatives for that much storage with SPI are FRAM at double or triple the cost, in hard to use BGA, or Microchip which have *finally* just come out with 1meg versions of their SRAM chips, very cheap, but still only a quarter the storage space so more real-estate.

  7. Are MRAM or FRAM related to the magnetic bubble memory that had a rather short use in the 80’s? (Mostly in one of Radio Shack’s pocket computers.)

    To me, FRAM is a company that makes oil and air filters. ;)

    As for “unlimited” things, when I got my first cell phone from Verizon, with unlimited night and weekend minutes, the brochure with it had printed on it that the “unlimited minutes expire first”.

    Que? If they’re unlimited, how can they expire, let alone expire before the limited daytime minutes???

  8. What I am curious on is, is there a substantive difference between MRAM and FRAM and similar (e.g. phase-change RAM) other than the unlimited vs. may-as-well-be-unlimited write cycles? For example, one thing I’m really interested in is power consumption per unit of data written. Does one from the technology standpoint have an inherent advantage over the other?

    I had not heard before that MRAM could be wiped by external magnetic fields. Good to know.

  9. According to Everspin MRAM does not suffer from imprint as FRAM does (though they would say that wouldn’t they!)
    Also there seems to be conflicting information on the scalability of the cell sizes of each of the technologies. FRAM sources I have looked at to date say that MRAM may have issues with smaller cell sizes and vice versa. Does anyone have more recent or categorical information on that?
    For choice in products I have used FRAM to date mainly because the are multiple vendors vs MRAM’s sole Everspin vendor which allows part substitution and also because of MRAM’s magnetic field vulnerability.

Leave a Reply to cjwoodallCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.