Skip to main content

What a Profiler can do for your design

What a Profiler can do for your design

How do you know if your design is power efficient?

Most MCUs offer different power modes that have different functionality. For example the one shown below is a specific MCU, the image illustrates its energy modes, and the functions available in each mode. By utilizing these energy modes whenever possible you can make your application as low power as possible.

title

In order to get your program to consume the lowest power it will need to go through iterations. You will most likely design it one way then add, tweak and change to optimize for power and performance, the tool that allows you to do this is an energy profiler. The specific profiler that I am using is provided for free within the Simplicity Studio IDE.  

 

What is a profiler?

The profiler is a tool that allows the designer to see real time current consumption. It also has the capability to see which function in the code is consuming the power. This makes it very useful because seeing which functions comsume the most power allows you to optimize it. This optimization is what will separate your program from other, less efficient programs. Below is an image which outlines the profiler. 

title

Functions are color coded so that it is easy to see the power performance of a function. Code is posted on the right that you can walk through and correlate to the power curve.

 What it allows you to see

  • Active current consumption
  • Individual function power consumption
  • Overall energy consumed
  • Triggers and timing of events
  • Battery score

Proof that it can help you

To show you the power of the profiler I set out to develop a simple application which can sleep and read sensors. It will be very simple and sleep, wake, then take a reading and return to sleep mode. 


One of my first iterations of the program had a mistake in which a timer was not functioning properly thus preventing the program from entering sleep mode. The profiler helped me find this. Below is a shot of the program with this mistake.

 title

Once I fixed the timer issue I was able to look at the profiler again. The profiler allowed me to see the current while in sleep mode and I realized that it was not as low as it should be based on the datasheet spec of the specific MCU that I was using..

title

As you can see I am sitting at about 30uA sleep current.

I realized that I was not properly disabling the ADC before entering sleep mode which was unnecessarily consuming power. A simple change was made to do this and the profiler reflected that change. Now that the ADC was properly disabled in sleep mode the sleep current dropped to around 3uA. 

title

Being able to view the real time current use of your program during the development phase is extremely useful and allows full optimization that would be impossible without the profiler. I personally was able to catch a mistake and work through documentation to see how to achieve the lowest current possible.

The specific MCU that I was working with was the Silicon Labs EFM8 Sleepy Bee

The tool that is free and comes with an IDE provided by Silicon Labs is Simplicity Studio

TxBeech has not written a bio yet…
DesignSpark Electrical Logolinkedin