Use F-RAM to Replace SD Card in Raspberry Pi

For those who use their Raspberry Pi very frequently, there is always the risk of wearing out the SD card. This tiny, inexpensive, credit card sized, single board computer – the Raspberry Pi – or RBPi, boots and runs a Linux Operating System held on an SD card. Therefore, if your RBPi has to boot often, you run a database on the SBC or use virtual swap space that resides on your SD card, the life of the SD card reduces very fast.

In fact, any time you use the SD card, for example, for data logging, serial or network capture or while reading sensors, you are saving data to the SD card at fairly frequent intervals. Similarly, when you run a customized server on an RBPi such as an email or a web server, the system writes temporary or configuration files constantly to the SD card. That puts the SD card at risk.

The problem with SD cards or any other standard Flash-based memories and EEPROMs is that they require a block erase before writing any data. These devices have a limit to how many times these erase cycles may be used.

However, you can supplement the Flash-based SD card of your RBPi with an F-RAM board, called the Ironman. The first advantage is that F-RAM does not require any erase cycle to write new data, which makes it very fast. Secondly, F-RAMs can be written limitless times, so it will last a very long time. Thirdly, F-RAMs do not need external batteries to retain data. This video compares the three types of memories.

All over the world, nearly two million RBPis are running from SD cards. The RBPis write data frequently to the Linux root partition stored on their individual SD cards. On average, after 10,000 writes, an RBPi may fail to boot, losing all the data and configuration. Using an F-RAM card that adds 1-4 MB memory allows your SD card to be used as read-only. All the small databases, log-files, temporary files, configuration files, caches and anything that changes during normal use, goes on to the F-RAM card. That prevents use of precious kernel or application memory from the built-in RAM or tmpfs of the RBPi. The best part is that all the temporary files are available even after a reboot.

F-RAM or Ferroelectric RAM is very well suited for embedded systems. Being non-volatile, it does not require power or battery backup to retaining data up to 10 years. There is no restriction on erase/write cycles, making it as fast as SRAM. Unlike EEPROMs or Flash, there is no limit to the number of writes before device failure. The only disadvantages of F-RAM are cost and density/size.

F-RAMs can be read and written to up to 100 trillion times. To put that figure in understandable terms, you could write to the same address on the F-RAM chip 1,000 times per second continuously every second over 317 years – without the device failing. If the same process were to be tried on a Flash memory, the device would fail in just 100 seconds.