Editorial credit: DFree / Shutterstock.com
One of my favorite musical groups is the French DJ duo Daft Punk. One of the quirks of Daft Punk is that they pretend to be robots and perform all their shows in awesome robot costumes. In 2013 they released their album Random Access Memories, or RAM, to play on the robotic theme. However, they failed to specify exactly which kind of RAM. You and I know that in the world of embedded systems the type of memory you use is quite important. SRAM specifically has some advantages over Flash memory and especially DRAM, particularly when it comes to energy usage. There are now several different varieties of SRAM that you can use for your embedded application. Deep sleep enabled SRAM can give you both speed and energy savings when used correctly.
SRAM in Embedded Systems
It can be hard to choose a favorite band or artist. There are hundreds of thousands to choose from in so many different genres.When it comes to choosing memory for your embedded system things are a bit more simple. Let’s quickly compare SRAM, Flash memory, and DRAM so we can see exactly where SRAM can best be used in your system.
There are many different types of memory that are designed for embedded systems, including new entrants like CBRAM and Spin Wave devices. Some of the more traditional types are Flash, SRAM, and DRAM and each has its own place in the system. Interestingly, the physical locations of these memory types and the way you access them affect their power usage. The way each memory architecture works also has an effect. DRAM has to be refreshed in order to retain data, making it use more energy than the other two types. Flash is often used to store code, whereas SRAM is used as a cache, and DRAM is used for general memory.
The microcontroller that runs your system processes data very quickly and needs a memory that can keep up with the pace. That’s why SRAM is normally used as a cache. Flash and DRAM both have long write times that can limit the MCU (microcontroller unit). SRAM is also primarily limited to caches because of its small size. DRAM is used for operations that need bigger chunks of temporary storage.
SRAM and DRAM both have their place in embedded systems.
Types of SRAM
Daft Punk is my favorite band overall, but I also have top artists in each genre. Likewise, it’s important not only to know that you will use SRAM but exactly which type. Generally, SRAM with a deep sleep option can give you both the speed you need and save some energy.
Before the explosion of portable electronic devices, SRAM mostly focused on speed. Since we started carrying around super-computers with power hungry processors, though, low power SRAM has found a niche. The faster variety has access times around 10 ns compared to low power’s 45 ns. Low power obviously uses less energy with a 36 mA operating current vs 110 mA and astoundingly low 16 µA standby current as opposed to the speedier variety’s 30 mA. Obviously, both kinds are specialized and can provide great functionality for their designed use cases. However, neither kind can provide what we really want; speed with power savings.
Deep sleep SRAM is a hybrid type that nearly gives us the best of both worlds. With a 10 ns access time, it’s as quick as can be, and its “deep sleep” state nearly matches the low power standby current at 22 µA. When not in deep sleep its standby current is still 30 mA, and during normal operation, it will still draw around 110 mA. When used properly deep sleep SRAM can give you the performance you need, while saving you nearly as much energy as a low power type.
Deep sleep SRAM will help you save energy.
When to Use Deep Sleep SRAM
It’s important to play the right kind of music at the right time. You don’t want to break out Beethoven’s Moonlight Sonata at a birthday party. The same goes for deep sleep SRAM, there are times when it will help, and times where it just doesn’t make sense.
There is one case in particular where using deep sleep SRAM doesn’t make much sense. That’s when the use times of the SRAM are too close together for it to enter deep sleep. Let’s say your SRAM takes 300 µs to enter deep sleep and your system accesses it every 250 µs. Your SRAM will never be able to enter deep sleep and will essentially behave like typical SRAM. Then you’ll have spent extra money for something that does what any normal SRAM can do. Before implementing deep sleep SRAM in your system make sure that you can get the most out of its deep sleep capabilities.
Some of you might be concerned that deep sleep SRAM is hard to integrate into your system. Will you have to redesign your connections or battery backup if you have one? Luckily the answer is no, not really. Deep sleep enabled SRAM has only one extra pin when compared with normal fast SRAM. If you can’t squeeze one extra pin in there then I don’t know what to say.
You may not think much of my musical choices, but I hope you can see the value of deep sleep SRAM. You’re probably using SRAM as a cache for your MCU, where it beats the access times of Flash and DRAM. I’m sure you’re happy that SRAM uses less energy than DRAM, but by using fast SRAM with deep sleep capabilities you can get both speed and power savings. Just make sure that your system can actually make use of the deep sleep features.
No matter what kind of memory your system uses, you need good PCB design software that can integrate it well. CircuitStudio® has a host of great features that will help you incorporate any kind of memory into your designs.
Have more questions about SRAM? Call an expert at Altium.
If you happened to be reading this but don't use Altium yet, be sure to check out your own free trial to find out for yourself why Altium is the most unified and professional PCB Design software.
Share your thoughts and feedback in comment below and remember to share!