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 ).
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.
The developer can then visually determine which components are consumingthe most power in that supply domain, and try to target configurationchanges on those components. As an example, Figure 2 shows howclicking on the ADC’s pie slice opens a properties window that displays alist of configuration properties filtered to include only thoseproperties whose changes will impact power consumption.
Power Estimator also allows developers to take snapshots of a power mode while configuration is in-progress (Figure 3 ).Snapshotting gives developers a visual, easily interpreted method bywhich they can see how a set of configuration choices affects powerconsumption. Both windows displayed in the snapshot view can be exploredby clicking on pie slices to drill down to expose more information asneeded.
ThePower Estimator tool has been optimized specifically to simplifyconfigurations of some of the SiM3L1xx MCU’s key ultra-low-powerfeatures that can be onerous to configure manually (Figure 4 ).The default configuration of the Si3L1xx MCU leaves the dc-dc converterdisabled, and the supply voltage is routed directly to the on-chip LDO.Directly applying a 3.3 V supply to the LDO will result in an efficiencyloss of around 40 percent, which can be substantial in battery-poweredapplications.
However,the AppBuilder user interface provides a few easy-to-understand listsof properties that a developer can modify to enable the dc-dc converterand allow the LDO to use the dc-dc converter’s output as its input. (Figures 5 and 6 ) Power Estimator’s snapshotting tool makes the power savings gained through the use of the dc-dc converter easy to observe (Figure 7 ).
Figure 6: Supply routing after configuration changes
Figure 7: Power savings illustrated using Power Estimator
A power-aware software tool simplifies difficult development tasks
Usinga software tool like Power Estimator instead of jumping to iterativefirmware development on a hardware platform means less time spent poringover a reference manual and less test setup frustration. Powered by asophisticated modeling algorithm, Power Estimator’s visualizationtechniques for displaying component-by-component power consumptionenable developers to see at a glance where their system power is beingconsumed.
The interactive charts and user interface designfacilitate easy exploration and alteration of configuration choices,with every choice resulting in a real-time, reliable updates to powerconsumption information. The next time you embark on a challenging,power-sensitive embedded design, be sure to choose an MCU platformsupported by easy-to-use power-aware tools that help simplify the taskof minimizing system-level current consumption.
Note: SiliconLabs’ AppBuilder software provides a graphical view of hardwareconfiguration and generates code when the configuration completes. Thiscomplimentary tool is deeply integrated with the Silicon Labs HardwareAbstraction Layer used to configure all peripherals as well as thePrecision32 IDE, which is an Eclipse-based development environment withsophisticated debug features. AppBuilder checks for potential conflictsand errors with every configuration choice the user makes, and itprovides helpful instructions on how to resolve issues as they arise.The tool gives developers an intuitive process by which they can createmultiple operational modes, as well as a graphical display to configuregate clocks and port pin functionality.
Parker Dorris is a senior applications engineer supporting Silicon Labs’microcontroller product line. He joined Silicon Labs in 2003 when thecompany acquired Cygnal Integrated Products. Mr. Dorris specializes inthe areas of human interface and USB embedded system design. He holds aBSEE from the University of Texas at Austin.
Paul Zucker is a staff systems engineer at Silicon Labs, specializing in developmenttools, debug solutions and firmware development on the ARM platform.Mr. Zucker joined Silicon Labs in 2010 after working in variousengineering roles at Freescale, SigmaTel, and AMD. He has more than 25years of experience developing embedded systems from 8-bit bare metaldesigns to 32-bit embedded Linux systems and everything in between. Heholds a BSEE from Washington University in St. Louis, Missouri, and a BAin mathematics from Doane College in Nebraska.