No microcontroller (MCU) vendor has yet figured out an easy way to design an MCU with a “lowest power enable” bit that firmware can toggle on as needed. The challenges that arise from designing high-performance MCUs that operate in the nA (nano-ampere) current draw range require complex and innovative solutions.
Every clock gate that must be managed, and every peripheral that must be dynamically adjusted depending on operational state, requires firmware intervention, whether that means micromanaging every control register or carefully configuring on-chip resources that in turn manage other hardware components. The resulting firmware is inherently complex, and the creation of that firmware can be especially daunting for engineers designing with limited time and resources.
Every MCU vendor provides datasheets and reference manuals that describe low-power functionality configuration in comprehensive detail. Similarly, MCU vendors carefully specify current draw figures for their MCUs, both to emphasize the benefits of their current-saving circuits and to provide a set of target current consumption features that engineers can use in their designs. But relatively few MCU vendors go one crucial step further: providing software tools that guide development toward current consumption-optimal design. Creating “power-aware” software tools that truly simplify development is a challenge that is at least as difficult to overcome as the design of the low-power silicon itself.
The challenges of low-power firmware development
Low-power design is no longer isolated to battery-powered systems that require multi-year operation on a single coin-cell battery. New low-power design standards impose strict power consumption limits on most consumer electronics, even those running on wall outlet power. These new requirements mean that power-conscious design has become a consideration in all embedded system creation, which can be challenging for designers because excelling at low-power design is very difficult.
The list of obstacles facing a low-power system designer is formidable. First, anyone who has ever read a datasheet describing low power functionality knows how overwhelming the overlapping, conflicting, and confusing configuration can be. Because it’s simply not practical for a developer to spend weeks studying a 500+ page datasheet before beginning code development, developers commonly start work with an incomplete understanding of the challenges they face. Code gets written and measured with a current meter, only to discover that current draw wildly overshoots the low-power specifications that made the MCU in use so attractive at the project’s inception.
The disparity between expected and actual results is likely caused by more than firmware configuration errors. The hardware under test often adds to current consumption overshoot.
Developers start either with a vendor-provided target board or a prototype board of their own design. Many target boards offer a myriad of hardware configurations governed by shorting block placement on jumpers, and a single misplaced jumper can skew current draw measurement dramatically.
Similarly, prototype boards are often designed to create expedient proof-of-concept development, and low-power optimization is not a driving priority. In either case, the hardware platform in use might not be designed for optimal power usage, which can make extreme low-power firmware optimization impossible.
Finally, vendor-supplied firmware can add another layer of abstraction when developing low-power code. In many cases the example code provided to customers is written to function as a starting point to address the largest number of potential customer applications. The complicated code required to achieve the lowest power is often omitted from simple code examples for the sake of readability.
New power-aware software tools ease the challenge
An example of power-aware software that greatly simplifies these challenges for the developer is Silicon Labs’ Power Estimator tool, a plugin software tool that Silicon Labs integrated into AppBuilder (see note on AppBuilder at end of article) with the release of the SiM3L1xx MCU family. Power Estimator provides a useful combination of innovative MCU performance modeling, an elegant user interface, an informative messaging system offering power-saving pointers and reliable code generation. These combined capabilities greatly simplify the challenge of optimizing power-sensitive embedded systems for ultra-low current consumption.
The Power Estimator was designed for use with Silicon Labs’ SiM3L1xx family of ARM Cortex-M3 processor-based Precision32 MCUs, which provide ultra-low-power consumption while also offering a comprehensive array of high-performance features and analog/mixed-signal peripherals. Nearly every digital and analog peripheral found on these 32-bit MCUs includes specially designed features that can be leveraged for extreme low power functionality, resulting in an average current draw in many applications below 250 nA in sleep mode (with RTC at 3.6 V). The SiM3L1xx family was designed from the ground up to achieve the lowest possible sleep current, provide data control and sensing features that enable a sophisticated level of automation without requiring firmware intervention, and achieve efficient active mode current draw without sacrificing key performance criteria.
Power Estimator is written in a dynamic programming language and uses a hierarchical, object-oriented model that describes power consumption with precision down to the nA range. Dependencies intelligently bind conditions to each other so that nth-order effects of a single configuration choice are reflected throughout the entire model. The model generates its current estimation output based on precisely acquired current information that draws on data synthesized from a vast repository of characterization data and guaranteed-by-design proprietary hardware design. The result of this modeling algorithm is that the AppBuilder can determine down to tens of nA how much current will be consumed by every configuration choice the developer makes.
Because the SiM3L1xx MCU exposes so much control of its power consumption through registers, the developer has hundreds of ”knobs” to turn, and each adjustment can materially affect current draw. The Power Estimator tool shows in real time which settings have the most substantial impact on current draw. This visualization provides the developer with instant feedback on how each design choice affects the project’s power budget. This design methodology circumvents the pitfalls usually associated with low-power design: the developer gains this perspective on current consumption before experimenting with in-system configuration. Power Estimator saves developers from the trial-and-error iterative process of writing one line of configuration, building and downloading firmware, and measuring current draw on a hardware platform that could introduce an unknown number of factors that increase current consumption.
Additionally, the Power Estimator tool generates a list of ”Power Tips” that provide further expert advice on low power that extend the tool’s reach beyond code generation and into the second-pass development that begins when generated code is imported into the Precision 32 IDE. These tips, which are generated dynamically based on configuration choices, are rooted in proven system-level best practices that help developers maintain low-power firmware creation well past the code-generation stage of development.
The Power Estimator tool illustrates how design choices affect current draw in a number of useful and informative ways. In its simplest, most visible output, Power Estimator always displays the delta of power gained or lost through the last configuration choice with a text output along the bottom of the App Builder window (Figure 1).
Figure 1: Each adjustment updates output to show power savings
As with all power-related figures shown in the tool, this value is generated, not by populating variables in a simple mathematical equation, but instead through dynamically regenerating the model simulating output, which takes into account the rippling effects of the adjustment across all peripherals, clock domains, and supplies.
Power Estimator uses interactive pie charts to visualize power consumption as a composition of different components. These charts make clear how each component is consuming power relative to other components. Each pie chart slice is clickable, allowing the developer to drill down into different parts of the system to gain perspective on power consumption and target configuration changes where current consumption savings yielded will be most substantial.
For example, SiM3L1xx MCUs use a number of different supply domains, with some peripherals being powered by a VBAT input while others are powered by a dc-dc converter output. A quick exploration of the Power Estimator allows the user to focus only on peripherals powered by VBAT directly by simply clicking on the pie slice at the power model’s top level. Clicking on the VBAT slice generates another pie chart showing a component-by-component breakdown of power consumption.
To continue reading page 2, click here
(you'll go to Embedded.com).