I‘m working on a microcontroller-based project at the moment that requires the non-volatile storage of a bunch of user parameters. This is a common enough requirement for which I have typically used a serial EEPROM type memory.
EEPROM is cheap and effective, but it does have a couple of limitations. It has a relatively slow write speed at around 5ms and it has a limited number of erase/write cycles before the part becomes unusable, typically 100 thousand to 1 million cycles. There is no limit to the number of read cycles and the read speed is as fast as the serial bus can go.
In my application I want to capture the user settings so that they can be restored after power down. The user will change these settings frequently while the device is in use, and it is powered via USB so could be powered down any time without warning. This leaves me with a dilemma. If I write the user setting whenever they change, I will run up against the write limit. For example, if the EEPROM was written every minute of operation we would hit the cycle limit in about 16,000 hours of operation. That’s just over five years of operation at 8 hours per day.
Alternatively, I can try to store the parameters in non-volatile memory only when the power is removed. This is possible but requires up to be able to detect the power removal and keep the micro and EEPROM alive for the time it takes to complete the write process. It is not always easy to do this reliably, so I went looking for alternatives and discovered Ferroelectric RAM (FRAM).
FRAM is a non-volatile memory technology that relies on the special properties of ferroelectric materials. Unlike linear dielectric materials, ferroelectric materials can exhibit a remnant electrical polarization after an electrical field is removed. This is the electrical analog of ferromagnetism where a material can have a remnant magnetic polarization in the absence of a magnetic field. Because of this, FRAM memory is non-volatile and very fast to read and write. Its internal construction is a lot like DRAM in that each cell consists of a capacitor and a transistor (Figure 1).
Like DRAM, read operations are destructive and internal circuitry has to write the value back into the cell when it is read. The read/write endurance of FRAM is guaranteed at 100 trillion (1014) cycles and data retention typically greater than 100 years at 65°C.
So, what’s the downside? Cost of course. At the time of writing, a typical 16KB (2KB x 8) FRAM, such as the Cypress FM24CL16B, costs $1.68 (USD) in unit quantity, while a comparable EEPROM, the ON Semiconductor CAT24C16WI costs just $0.16 (USD). FRAM seems to be about 10 times the cost of an equivalent EEPROM across the board. I’m not building a high-volume product, so I will use the FRAM this time because the additional cost is worth way less than the design effort needed to be sure an EEPROM solution will work every time.
“FM24CL16B, 16-Kbit (2K × 8) Serial (I2C) F-RAM.” Cypress Semiconductor, n.d. https://www.cypress.com/file/136491/download.
“CAT24C01 – EEPROM Serial 2/4/8/16 Kb I2C,” n.d. https://www.onsemi.cn/PowerSolutions/document/CAT24C01-D.PDF.
“What Is FRAM Memory: Ferroelectric RAM Electronics Notes.” Accessed September 1, 2020. https://www.electronics-notes.com/articles/electronic_components/semiconductor-ic-memory/fram-ferroelectric-ram-memory.php.
“FRAM FAQs” Texas Instruments. Accessed September 1, 2020. https://www.ti.com/lit/wp/slat151/slat151.pdf?ts=1603894139072&ref_url=https%253A%252F%252Fwww.google.com%252F
Andrew Levido (firstname.lastname@example.org) earned a bachelor’s degree in Electrical Engineering in Sydney, Australia, in 1986. He worked for several years in R&D for power electronics and telecommunication companies before moving into management roles. Andrew has maintained a hands-on interest in electronics, particularly embedded systems, power electronics, and control theory in his free time. Over the years he has written a number of articles for various electronics publications and occasionally provides consulting services as time allows.