Brief Survey of the Different Types of Memories Used in Embedded Systems

by | June 11, 2019

This is a brief survey of the different types of memories used in embedded systems. Memory is used to store a system’s program and data. There are several types of memories with different applications in embedded systems. Memory that normally resides in the processor chip is called primary memory. Let’s look at the different types of primary memories to see how they are used within the embedded system.

The dichotomy of these types of memories is arranged according to four memory characteristics or attributes. They are:

– Accessibility
– Writability
– Volatility
– Programmability

Accessibility: Obviously all memory in the system must be readable; otherwise the contents would not be accessible. There are different methods used to access the contents of a memory, however. Normally, all memory in a processor use random access. We say that a memory is accessible with random access when the same interface is used for any location, and any location can be accessed without having to access any other, and consequently the access time is the same for every location. You would think that all memory in a processor should be random access, and that is pretty much the case. However; there are some application specific processors, mainly in the telecommunications and networking arena, that have memories reflecting different data structures that are not random access. An example would be a FIFO (First-In-First-Out) memory. Processors also have a FIFO that is not very visible to the user. This is called the stack, and is mainly used to save registers and parameters between function calls and context switching, including Interrupt Service Routines (ISRs). 

Writability: Although all memory is readable, not all memory is writable. A memory is said to be writable if the contents can be changed by a CPU during the normal course of the execution of a program. We would not categorize the Flash Program Memory of a processor as a writeable memory. Although it does get written to load the program and constant data, and it could be written via a special sequence of instructions in most processors. The most common writable memory is the RAM – Random Access Memory. 

Volatility: A memory is nonvolatile if its contents are retained when the power source is removed. A volatile memory device loses its contents with the loss of power. If the contents must survive when there is no power, a nonvolatile memory must be used. In general RAM is volatile and ROM (Read Only Memory) is nonvolatile. If a particular product requires both writability and nonvolatility, a data EEPROM (Electrically Erasable/Programmable ROM) should be used. Although EEPROM and what we call program Flash use the same memory cell circuit, the EEPROM has additional logic, so it can be written in small data units like Bytes. Normally, Program Flash has to be written in larger chunks called pages. Both can always be read in small data units. Because of the extra logic, EEPROM will be larger and consume more power than an equivalently sized Program Flash. That’s one of the reasons that they are smaller in capacity than the Program Flash memory. 

Programmability: The process of changing the contents of a ROM device is called programming. Some ROMs can be programmed only one time; they are called One-Time-Programmable (OTP) ROMs. This means that if the program or data contained in the ROM must be changed, then a new device is required. There are three different methods for programming ROMS: (1) mask programming by the manufacturer, (2) user programming using a device programmer, and (3) user programming in circuit. Memories that are reprogrammable are programmed with methods (2) and (3); while OTP ROMs can be programmed with all three methods. 

It is important that system designers understand the tradeoffs between the different types of memories, so they can choose the right components. And meet systems requirements while optimizing for all necessary technical performance metrics of the system.

Not sure what type of memory to use for your projects? We can help.