thumb mramHands up any of you that have heard of MRAM?  That's "Magneto-Resistive Random Access Memory", by the way.

MRAM is set to blow the socks off the microcontroller world, or my name's not Felicity Kendall.  Until recently I didn't even know they were actually commercially making this stuff yet, but it turns out they are.

But, what is Magneto-watsit thingummyjig?  Simply put, it's RAM that uses a magical combination of magnetism and resistance to store data.  Now, I'm not going to even pretend to know how it works, so here's my friend Wikipedia to explain it:


Unlike conventional RAM chip technologies, in MRAM data is not stored as electric charge or current flows, but by magnetic storage elements. The elements are formed from two ferromagnetic plates, each of which can hold a magnetic field, separated by a thin insulating layer. One of the two plates is a permanent magnet set to a particular polarity, the other's field can be changed to match that of an external field to store memory. This configuration is known as a spin valve and is the simplest structure for a MRAM bit. A memory device is built from a grid of such "cells".

The simplest method of reading is accomplished by measuring the electrical resistance of the cell. A particular cell is (typically) selected by powering an associated transistor that switches current from a supply line through the cell to ground. Due to the magnetic tunnel effect, the electrical resistance of the cell changes due to the orientation of the fields in the two plates. By measuring the resulting current, the resistance inside any particular cell can be determined, and from this the polarity of the writable plate. Typically if the two plates have the same polarity this is considered to mean "1", while if the two plates are of opposite polarity the resistance will be higher and this means "0".

So there it is.  Now... Why am I telling you all this?  Well, yesterday I took delivery of some MRAM samples from a company called Everspin.  SPI MRAM chips, in an 8-pin DFN configuration (yes, a bit of a pain for the hobbyist, but it gave me an excuse to experiment with the UV cure solder resist paint I got from China the other day) with a massive 4 mibibits x 8 bits (512KiB) is pretty impressive.  I have no idea how much these things cost.  They don't list prices on the Everspin site, and Farnell don't have any prices for the Everspin products.  They sell a single MRAM by Freescale, at 308 bits for about £20, so I dread to think what these 4 mibibit ones retail at.

Still, I have some, and I am overjoyed at them.thumb mramSPI MRAM chips, 8-pin DFN pacakges

They can supposedly run at up to 40Mbps, but I haven't managed to get anything better than 20Mbps out of them, but that's probably down to my shoddy wiring.  I have put 4 of them together on to a board and linked them up to my RetroBSD system for testing.  And, I must say, it was surprisingly simple to get them going.  The SPI protocol is really simple, and because they are RAM, and not EEPROM, there is no silly block erase or anything like that to worry about.

And, they're non-volatile.  Yes, a RAM chip that's non-volatile.  And I don't mean a RAM chip with a battery.  These are naturally non-volatile, with data retention > 20 years.  And the speed is that of traditional static RAM chips.

And they don't wear out.  There is no maximum lifetime for these bad boys, not like Flash chips, which have a limited number of write cycles.  These just keep going and going and going...

But it's the future I'm most excited about.  Imagine what this technology would mean for the traditional microcontroller market...

Imagine if they took a normal PIC, and replaced all the memory in it with MRAM.  I mean all of the memory - the flash *and* the static RAM.

There would no longer be any distinction between the program space (flash) and the data space.  You would have just one amount of memory, and it would be up to you how you use it.  Big program, small data?  Small program, huge data?  It's your choice. 

And think of the power savings.  At the moment you have the ability to put a microcontroller into a low-power mode.  In that mode it pretty much stops the processor, and provides just enough power to keep the RAM alove.  Or, you can go into deep sleep and stuff the RAM.  It's then up to you to reinitialise all your variables after waking up.  Now, with MRAM, that's not an issue.  Being non-volatile you can remove ALL power from the microcontroller, so it consumes ZERO watts of power.  Then, re-apply power, and it can continue exactly where it left off!

So, MRAM is certainly something to keep an eye on.

Posted: 6 years 11 months ago by Graham Mitchell #12378
Graham Mitchell's Avatar
Nice find - I can see it now "PIC64, inspired by Majenko". Mouser are selling these for AU$20/pc.

Great write-up Majenko, your humour is well matched with tech blogs!
Posted: 6 years 11 months ago by Graham Mitchell #12379
Graham Mitchell's Avatar
Microchip must be behind the times; I just found out that TI have some devices with onboard FRAM. They can fill 16KB in 1mS flat (125nS/byte) and they refer to the memory usage as "Universal Memory" (program + data + storage). On the down side they do have an endurance rating... It's flipping huge so no real worries there.

Also, I found this article was a good read to compared MRAM with other technologies.
Posted: 6 years 11 months ago by Baldor #12383
Posted: 6 years 11 months ago by majenko #12384
majenko's Avatar
Woohoo! I'm famous! First time I have ever made it on to Hackaday! Time to crack open the champers methings

Forum Activity

Member Access