How to Keep Your Memory Chips Healthy

While human memory and electronic memory are similar in many ways, they do have differences that might not seem so obvious at first.

A key difference to how memory operates in a human versus that found in a memory chip is how it wears over time. When a human exercises their memory, it improves. Memory exercises are common practice for those suffering from memory loss or who just want to improve it. But in the electronic world, a memory chip has a limit to reads and writes, and using it less (or more efficiently) is actually a good thing.

Being smart about memory management can have a big impact on the longevity and integrity of electronic memory. And memory controllers for more sophisticated applications help to condition and manage memory while keeping it error-free.

This article will dive into common strategies for extending memory life across a variety of applications, while summarizing the benefits that dedicated memory controllers bring.

Background on electronic memory

Electronic (or semiconductor) memory has been around since the early 1960s. It first started with magnetic-core memory, including BJT-type transistors, which, it’s worth noting, were quickly replaced by MOS-type transistors, as the latter was cheaper and less power-hungry. Today, MOS transistors continue to serve as the basis of memory integrated circuits (ICs) for most random-access memory (RAM)-based applications, including SRAM (static) and DRAM (dynamic).

Around the same time, read-only memory (ROM) was also invented. ROM was discovered when it was realized that the floating gate of a MOSFET could be used to store information, even when power is removed. Here, it’s worth noting that ROM has three variations — ROM, EPROM, and EEPROM, the latter most commonly used in embedded systems.

“Flash” ahead 20 years and a new kind of memory was invented — “flash memory,” which came about as a result of Toshiba employee Fujio Masuoka’s experimentations with a much quicker memory-erasing technique. A bit more specifically, this new technique consisted of a voltage applied to an entire memory block sharing a common node, which reminded one of Masuoka’s colleagues of how a camera flashes. While the technique was based on ROM fundamentals, flash holds many advantages and has since become dominant in ROM-based applications like thumb drives, cameras, phones, and most other embedded systems. Among the many benefits of flash memory: quicker, larger, block-wise functions (as opposed to EEPROM’s byte-wise functions) in a cheaper, smaller footprint. See Figure 1 for a comparison.

Figure 1: EEPROM vs. flash in terms of technology and physical size (Source: Microchip Technology)

Most embedded applications rely on both kinds of memory: ROM for program and long-term data storage and RAM for temporary or immediate data usage. Whether internal or external to an MCU, there are many techniques for prolonging the life of these memory devices. Let’s explore.

Tips and tricks for smart memory usage in embedded applications

There are many things that designers can do to make more efficient use of their memory. Many times, it’s simply a matter of smart(er) programming. Because most of these opportunities lie within the embedded realm, let’s focus on lower-level MCU designs.

Rule No. 1: When it comes to writing or storing data, always use RAM over ROM if permittable. RAM is faster (both internal to MCUs and external because of the parallel interface), doesn’t wear over time like ROM, and usually involves less complex firmware support (with the exception of external memory buses for more advanced embedded applications). If you’re working with data that doesn’t need to be saved between power cycles, there should be no need to store within ROM memory. ROM devices theoretically have infinite read endurance; it’s the write and erase cycles that wear it down.

Avoid bootup or initialization procedures that include routinely writing to internal or external ROM devices, especially if those locations get written to later on in the program from a host or higher-level entity. Writing and reading from ROM components is very common during the startup phase of an MCU, and it’s best to limit writes (and erase or clear functions) to critical information that requires saving for future use between power cycles.

Add a checksum to your read/write operations to and from ROM. This may not necessarily improve the health or longevity of the ROM device, but it certainly helps with minimizing errors or corrupt memory sections. Though they typically require a bit of extra effort during initial development, the payout in terms of reliability is usually worth it in the long run, especially if the data is related to MCU main code execution.

Another great technique for prolonging the use of a ROM component or memory block is to try and use difference sectors or blocks. If a routine requires frequently rewriting relatively small quantities of data to ROM, try indexing it in a designated “indexing cell or block” and saving to new cells so as to not wear out the same location (a simpler version of “wear leveling”). This is something that memory controllers often provide. Figure 2 shows a visual on how it works.

Figure 2: Visual demonstration of wear leveling (Source: Transcend Information)

When reading from a ROM such as flash, avoid excessive or frequent read operations from the same cell. This can cause something called “read disturb,” wherein reading from the same cell many times over can influence nearby cells and change them over time. Many memory controllers have protections in place to handle this with monitoring and cell management, but these programs don’t always catch it.

Memory controllers provide great benefits

As mentioned previously, memory controllers help manage and maintain memory maps to prevent early wear-out. These memory controllers are not to be confused with external memory controllers (EMCs) commonly integrated into MCUs for supporting various memory bus interfaces. Though they are very helpful to design engineers and can provide a variety of memory interfaces for RAM, ROM, or even a combination of both, they don’t provide the benefits being discussed here. Instead, we’ll be looking at standalone memory controllers specifically meant for data and memory management, the most common application of which is with NAND flash-based memory.

There are many applications that might benefit from flash memory controllers, such as GPS devices, video capture devices, USB thumb drives, SD cards, cameras, smartphones, security or authentication devices, wireless LAN devices, and MP3 or other audio-playback devices — basically anything that contains file-based storage and has a high write frequency.

Usually, the flash controller will be a programmable component (that may come standard with a firmware image on it) configured specifically for interfacing with flash memory. The CY7C680XX family of devices from Cypress (also referred to as NX2LP-Flex) are USB NAND flash controllers that provide flexibility with programmable interfaces, extra configurable GPIO, USB support meant for mass storage applications, error correction, interrupt management, and wear leveling. They serve as a go-between for USB and NAND-type flash and manage all of the read, write, and erasing operations while simultaneously providing the benefits listed above. See Figure 3 for an example of a GPS device utilizing NAND flash.

Figure 3: GPS unit with NAND flash and an NX2LP-Flex memory controller by Cypress (Source: Cypress Semiconductor)

Micron’s MTFC8GAMALGT-AIT e.MMC Memory + Controller Chip is a combination NAND flash memory with an on-board controller meant for multimedia card (MMC) applications. The controller manages the MMC communications protocol, while also handling block management functions such as block allocation and wear leveling, and does this all in the background unbeknownst to the host. It also incorporates defect and error management operations, wherein it identifies failed memory blocks and replaces them with spares while also employing error-correction-code algorithms to ensure data integrity. It comes in a variety of sizes ranging from 8 GB up to 128 GB, as well as a large variety of features, and, like the Cypress component, is fully programmable.

Silicon Motion specializes in memory interfaces and controllers, supporting SSD, MMC, universal flash storage (UFS), USB, and general embedded flash applications. We’ve mentioned USB and MMC applications, but let’s look at their SSD controller solutions. The SM2XXX family of ASIC devices from Silicon Motion are equipped with PCIe, SATA, and USB 3.2 interfaces that enable ultra-high-speed data transfer between PCs and external SSD devices, which, it’s worth noting, are generally made up of several channels/banks of NAND flash. By leveraging their patented NANDXtend technology, these devices provide an encode/decode algorithm that prevents data from being lost or corrupted while also boosting power efficiency and providing sophisticated error correction. Furthermore, the NANDXtend technology helps prolong the SSD’s lifespan and ensures data integrity and accuracy even when working with aged NAND flash arrays. Figure 4 shows the company’s SM2271 device, enabling SATA-to-SSD memory with the NANDXtend algorithms as well as some extra levels of security and encryption.

Figure 4: Silicon Motion’s SM2271 SATA-to-SSD memory controller with NANDXtend technology (Source: Silicon Motion)

Conclusion

Whether it’s a small, embedded device utilizing a simple MCU and ROM component or a mass storage application with high-speed interfaces, being smart about memory management can help extend the life of a memory device while also protecting it from corrupt or flawed data. 

Overstock AV Page Footer 560x140 2 1 1

Neue Beiträge

Leider ergab Ihre Suche kein Ergebnis

Aktuelles über Elektronikkomponenten­

Wir haben unsere Datenschutzbestimmungen aktualisiert. Bitte nehmen Sie sich einen Moment Zeit, diese Änderungen zu überprüfen. Mit einem Klick auf "Ich stimme zu", stimmen Sie den Datenschutz- und Nutzungsbedingungen von Arrow Electronics zu.

Wir verwenden Cookies, um den Anwendernutzen zu vergrößern und unsere Webseite zu optimieren. Mehr über Cookies und wie man sie abschaltet finden Sie hier. Cookies und tracking Technologien können für Marketingzwecke verwendet werden.
Durch Klicken von „RICHTLINIEN AKZEPTIEREN“ stimmen Sie der Verwendung von Cookies auf Ihrem Endgerät und der Verwendung von tracking Technologien zu. Klicken Sie auf „MEHR INFORMATIONEN“ unten für mehr Informationen und Anleitungen wie man Cookies und tracking Technologien abschaltet. Das Akzeptieren von Cookies und tracking Technologien ist zwar freiwillig, das Blockieren kann aber eine korrekte Ausführung unserer Website verhindern, und bestimmte Werbung könnte für Sie weniger relevant sein.
Ihr Datenschutz ist uns wichtig. Lesen Sie mehr über unsere Datenschutzrichtlinien hier.