Embedded software power consumption optimization solution

Publisher:雅意盎然Latest update time:2013-12-28 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
When developing battery-powered devices, especially systems with strict requirements on the standby or operating time of the device, such as mobile phones, it becomes increasingly important to reduce the overall energy consumption of the system. Therefore, taking comprehensive measures to reduce the consumption of battery energy is an important part of designing battery-powered devices.

Typical energy-saving measures include:

1. Select components with energy-saving properties
2. Improve system integration
3. Adjust CPU frequency
4. Adjust power supply
5. Select microcontrollers with energy-saving properties, cache memory and on-chip memory

However, the best energy-saving effect can only be achieved by fully controlling the components that consume battery energy through software and giving full play to the energy-saving properties of the hardware. Energy consumption is the product of current, voltage and time, and the control software has a great influence on these parameters. Therefore, software engineers need to constantly try to determine the best configuration of these three parameters in different operating modes to achieve the best energy-saving purpose. For example, engineers may ask themselves the following questions:

1. Is the microprocessor operating in the correct power-saving mode
? 2. How will program changes affect the system's energy consumption
? 3. Are there any unexpected energy consumption peaks?

To answer questions like these, a test device is needed. This device needs to be able to measure, record and analyze the program and data flow of the control software, as well as the current and voltage gradients. At the same time, all the recorded information can be correlated in a simple way. At the 2007 Embedded World Annual Conference, as the world's first embedded software energy consumption analysis tool manufacturer, Lauterbach demonstrated a powerful and easy-to-use solution that successfully solved all of the above problems.

Technical requirements:

In order to locate the energy consumption of each line of code, the following data information needs to be collected:

1. The program flow of the control software. A debugger with real-time tracing capability (PowerDebug) can be used to collect this information.
2. The current and voltage gradients when the program is running. A logic analyzer with analog/digital probes is a more suitable measurement device for this purpose.

With this data, the main task is to correlate the information of program flow, current and voltage gradient. However, if equipment from different equipment manufacturers is used, even if the relevant information can be correlated, the actual operation will be very complicated, and the analysis and statistics of the comprehensive data will also be quite difficult.

The innovative core of Lauterbach's embedded software energy consumption analysis technology is to provide solutions to the above problems and develop appropriate and easy-to-use information display and analysis methods.

Solution:

The Lauterbach embedded software energy consumption measurement solution includes a debugger module (PowerDebug), a real-time tracing module (PowerTrace), and a logic analysis module (PowerIntergrator). Each module integrates an accurate time counter, and the counters of all modules are synchronized at the beginning of the program. Each module's record has a corresponding timestamp, so the records of each module can be associated through the timestamp. In this way, the energy consumption of each line of code can be determined.



To acquire current and voltage gradient data, TRACE32 PowerTrace II (trace module) or PowerIntegrator (logic analysis module) can be extended with the new Trace32 AnalogProbe module to:

1 Real-time recording of 4 voltage channels and 3 current channels
2 Real-time generation of trigger events for limit values ​​and measurement ranges of current, voltage or energy consumption

In order to measure the current, a shunt resistor is required in the circuit under test. The voltage drop across the resistor depends on the size of the resistor and the current through it. Trace32 AnalogProbe can measure/record the voltage value across the shunt resistor. This is a measurement method commonly used and supported by many evaluation platforms. [page]

Current, voltage and shunt resistor values ​​can all be controlled from the user interface below. Energy consumption calculated from current and voltage can also be controlled from this user window, in addition, the user can set the voltage to a fixed value for calculation.

Current, voltage and energy consumption can be displayed in tables and time-based graphs. All time-based information (program flow, graphs, current, voltage, energy consumption) can be synchronized with the trace information. If a position is selected/marked in one of the windows, all other windows automatically refresh the window content and the corresponding time position information is also selected/marked.

In the following example, 8 LEDs are turned on in sequence, and a sinusoidal voltage is generated. The current-time curve (1) below plots the waveform of the current value changing with time, and the sinusoidal voltage curve is shown in (2). If the function "LED3_on" is selected/marked with a black vertical trace line in the current graph (1), voltage graph (2) or program flow graph (3), the system will automatically update the information in the "Trace.List" window (4), display the corresponding record, and mark it with a blue horizontal bar.



Each time a program is terminated, Trace32 software will automatically perform statistical analysis on the recorded information, counting the minimum, maximum and average energy consumption of each executed function, as well as the absolute energy consumption of each function and its percentage of total energy consumption. Through these statistical data, the program code/function with the highest energy consumption can be easily located.

Data statistics analysis can show the energy consumption of each function when it is running. As shown in Figure (5), the system consumes the most energy when the function "LED8_on" is running (all LEDs are lit).



As an additional function, Lauterbach also provides a trigger unit, which can define trigger events by defining the limit value or range of current, voltage or energy. These trigger events can be used by the trigger unit to start and stop the control of the trace recording (Selective trace), or use these trigger signals to terminate the program. In this way, engineers can easily and quickly locate the cause of the peak of the relevant parameters.

Summarize:

Lauterbach's complete embedded software energy consumption analysis measurement solution provides a powerful and easy-to-use tool for R&D engineers to detect/locate the relationship between program code and system current/energy consumption. The above new features have been integrated into the current software environment. The relevant analysis hardware can also be easily implemented through expansion on the original tool. Long-term and close cooperation with major global mobile phone manufacturers ensures the practical application effect of Lauterbach's tools. By integrating new innovative solutions, Lauterbach once again confirmed its innovative ability in the field of embedded processor development tools. As a new solution expansion module, Trace32 AnalogProbe can be integrated into the existing Lauterbach modular development tool system, adding new value to customers' existing TRACE32 tools.

Reference address:Embedded software power consumption optimization solution

Previous article:Design of test system for real-time embedded products
Next article:Remote Automatic Rainfall Monitoring Network Based on GPRS

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号