feature article
Subscribe Now

Like Flash, But Different

As status symbols go, memory chips are about as low as you can get. Even in the nerdy world of embedded chips and software, memories are low on sex appeal, low on differentiation, and low on most designers’ list of interesting devices. They are, in a word, generic.

So what’s new and exciting in the world of embedded memories? Uh… nothing, really. But that doesn’t mean it’s not worthwhile reexamining your assumptions about memory and memory types. There’s a decades-old memory technology that perhaps has been overlooked for too long.

We’re talking here about FRAMs, specifically the ferroelectric RAM chips made by Ramtron International Corporation. Ramtron has been making FRAMs for longer than some of us have been out of diapers. Even if the technology’s not exactly new, it’s still interesting and terrifically useful for a subset of embedded developers.

A Little Knowledge…

If a little knowledge is a dangerous thing, then most designers are downright hazardous when it comes to FRAMs. Few engineers know what they are or how they work. Or care much, for that matter. So here’s a primer.

FRAMs are nonvolatile memories, like flash or EPROM. They have nothing in common with MRAM (made by EverSpin, once part of Freescale). They’re electrically erasable like flash or E2PROMs but are faster than either. Unlike flash and other “floating-gate” technologies, FRAMs store data by capitalizing on a crystalline structure inside the chip. The memory array is made up of rows of crystals (it’s lead zirconate titanate, or Pb(Zr,Ti)O3 if you’re into that kind of thing). The central ZrTi atom in each crystal will “snap” into one of two orientations if you apply a current. Then it stays there, effectively storing one bit of data.

Here’s where it starts to get confusing. Chemistry geeks hear the “ferroelectric” part and start imagining iron content and magnetic fields. In fact, neither is accurate. To Ramtron’s everlasting dismay, the chips are called ferroelectric not because they actually are, but because their charge/voltage fundamental describes a hysteresis loop that looks a lot like iron’s. It also looks kind of like a lowercase F if you graph it just right. Ramton personnel have been patiently explaining away that misconception for 25 years.

In reality, FRAMs chips are impervious to magnetic fields and just about everything else. They’re nonvolatile in every sense of the word. Sounds good, but why would anyone use FRAM over EEPROM or flash?

Speed Is Good

Their biggest advantage is speed. FRAM chips are as fast as SRAM but are nonvolatile. They also read and write at the same speed, which flash chips certainly don’t do. They’re can tolerate about a zillion read/write/erase cycles, so they’re longer-lived than either EEPROM or flash. Finally, they use less power because they don’t need a charge pump (like flash) or a battery backup (like SRAM). So if you need to store nonvolatile data quickly, FRAM looks like a nice option.

Where do they fall short? Well, their capacity isn’t very good and they’re more expensive than other types of nonvolatile memory. The biggest FRAM chips Ramtron makes have 8-Mbit (1 MB) capacity; most are in the 256K- to 2-Mbit range. So even though they’re fast enough to execute code directly from FRAM, they’re not always big enough to make that work.  

Their fast write time makes FRAMs particularly useful when you need to store data quickly before the power fails or the system crashes. And we do mean crashes: automakers use FRAM to store diagnostic data in the event of a collision. Flash memory, on the other hand, takes time to precharge and store its data. If the power (or a support component) fails during the lengthy write cycle, the data may be lost forever. Flash chips generally also need a software-mediated erase/write procedure that takes time. Writing to FRAM, in contrast, is just as quick and simple as writing to SRAM.

But Wait, There’s More

For other FRAM fans, longevity is the issue. Both flash and EEPROM technologies wear out; the chips are rated for a certain number of erase/write cycles. Overuse the chip (or even part of it) and the entire thing becomes unstable. Granted, the limitations are pretty high – on the order of tens of thousands of cycles – but they’re finite limits nonetheless. Makers of flash file systems have to worry about such things.

FRAMs, on the other hand, are good for literally trillions of write cycles – more than enough for the average embedded system. FRAMs also don’t have to be erased before they’re written. There’s no erase/write cycle as with flash memories, and no need to spread the cycles around to even out wear on the device. That also means there’s no software overhead involved in choosing the least-used part of the chip, reading a block, erasing it, merging in the new data, and writing the new block. With FRAM it’s a single write cycle and you’re done.

Because FRAMs are relatively low-capacity devices, they tend to come in small packages with simple serial interfaces. Ramtron makes chips with either I2C or SPI interfaces, in capacities from 4 Kbits to 2 Mbits. Voltages are in the 3V – 5V range and 8-pin packages are typical. The company also makes chips with parallel interfaces and pinouts that mimic those of SRAMs. With little or no tweaking of PC board layout, you could replace an existing SRAM with an FRAM and eliminate the battery. It’s green!

In an interesting twist, Ramtron has applied its nonvolatile technology to a different kind of chip it calls a “state saver.” Instead of storing data, these little chips store the high/low state of external signals. When the power fails, the nonvolatile state saver will keep pins pulled high or low, which can be handy for keeping LEDs, analog inputs, relays, or control signals in their current state until the power comes back on or the software wakes up.

Okay, so maybe memory still isn’t a sexy part of embedded design. But it’s still necessary and it still needs to work well. Debugging flaky nonvolatile storage is frustrating, as you cycle the power over and over waiting for that one-in-a-million corner case to present itself and corrupt your data. How much easier would it be to just replace the battery-backed SRAM with an FRAM and call it a day? Sure, FRAMs aren’t for everybody but they’re probably suitable for more applications than we think. Just don’t call it magnetic.

Leave a Reply

featured blogs
Dec 19, 2024
Explore Concurrent Multiprotocol and examine the distinctions between CMP single channel, CMP with concurrent listening, and CMP with BLE Dynamic Multiprotocol....
Dec 24, 2024
Going to the supermarket? If so, you need to watch this video on 'Why the Other Line is Likely to Move Faster' (a.k.a. 'Queuing Theory for the Holiday Season')....

Libby's Lab

Libby's Lab - Scopes Out Silicon Labs EFRxG22 Development Tools

Sponsored by Mouser Electronics and Silicon Labs

Join Libby in this episode of “Libby’s Lab” as she explores the Silicon Labs EFR32xG22 Development Tools, available at Mouser.com! These versatile tools are perfect for engineers developing wireless applications with Bluetooth®, Zigbee®, or proprietary protocols. Designed for energy efficiency and ease of use, the starter kit simplifies development for IoT, smart home, and industrial devices. From low-power IoT projects to fitness trackers and medical devices, these tools offer multi-protocol support, reliable performance, and hassle-free setup. Watch as Libby and Demo dive into how these tools can bring wireless projects to life. Keep your circuits charged and your ideas sparking!

Click here for more information about Silicon Labs xG22 Development Tools

featured chalk talk

Advances in Solar Energy and Battery Technology
Sponsored by Mouser Electronics and onsemi
Passive components will play an important part in the next generation of solar and energy storage systems. In this episode of Chalk Talk, Amelia Dalton, Prasad Paruchuri from onsemi, Walter Fusto from Würth Elektronik explore trends, challenges and solutions in solar and energy storage systems. They also examine EMI considerations for energy storage systems, the benefits that battery management systems bring to these kinds of designs and how passive components can make all the difference in solar and energy storage systems.
Aug 13, 2024
54,624 views