SRAM or Static Random Access Memory is found in many electronic devices from alarm clocks and thermostats to hard drives. Specialized SRAM is used as cache memory in microcontrollers and microprocessors. Static, because its contents stay in whatever state they were programmed, indefinitely, but only if power is applied. SRAM is volatile memory, meaning that its contents are lost if power is removed.
Lithium “coin cell” batteries are commonly used to retain data through power cycles. This implementation is called Battery-Backed SRAM and was often used in many industrial applications such as PLCs, Motor Control, Robots, HMIs etc. These real-time industrial automation systems log messages, and data related to alarms and contents of internal registers, state of environment variables etc. This functionality is generically called Data Logging.
Data logging has a few simple requirements – persistence, high endurance to survive many repeated read-write operations and fast & reliable writes in order to protect data in the event of unexpected power loss. Non-volatile memory devices, memory devices which retain data when power is removed, typically either have poor endurance or are not scalable to higher densities or both. Examples of such non-volatile memory devices include EEPROMs & Flash (both NOR and NAND Flash) – which suffer from low endurance, and, F-RAM & Toggle MRAM which are not scalable to higher densities. In the absence of scalable and reliable non-volatile memory devices, designers of industrial automation systems used battery backed SRAMs for data logging. The real question is not “Can I connect a battery to a RAM to prevent data loss during power outage?” but “Should I connect a battery to a RAM to prevent data loss during power outage?” since battery backed SRAM suffers from several drawbacks arising from its dependence on batteries.