Archive for September, 2007

h1

ColdFire vs. S08 in Low Power Applications

September 25, 2007

Hopefully by now you’ve heard of Freescale’s first family Flexis(TM) microcontrollers. These are families of 8-bit S08 MCU’s paired with families of pin and peripheral compatible 32-bit ColdFire(TM) V1 MCUs. The first Flexis MCUs, the QE family, are also some of the lowest power MCUs Freescale has produced.

Since the Flexis QE family is designed for minimum power consumption, the question arises, “Which one is better for a low power design?” Let’s take a look…

Specs
If we look at just the raw supply current specs for the S08 QE vs the V1 QE, we see that the S08 typically consumes half as much power in run and low power run modes, but is only slightly lower in the stop3 mode and is equal to the V1 in the lowest power stop2 mode.

idd_v1_v_s08.jpg

Figure 1: Supply current comparison of the V1 QE128 and the S08 QE128

CPU Workloads
So based solely on these specs, you would probably favor the lower power S08 QE. However, we need to look at how much work the CPUs must perform while in run mode. The 32-bit V1 CPU has far more horsepower than the 8-bit S08. For one thing, the V1 executes instructions at the CPU frequency and the S08 executes instructions at the bus frequency, which is 1/2 of the CPU frequency. In addition, the V1 has far more CPU registers and, of course, utilizes 32-bit instructions/operands for more efficient data processing.

In a previous post (Clock Management for Low Power Application, July 13th), I discussed the concept of running fast to spend as much time in the lowest power mode possible. With this philosophy, you can easily see how a more powerful CPU will complete any calculations faster and therefore be able to spend more time in the lower power stop modes, thereby lowering the overall MCU average power consumption.

Same Peripherals
So, the V1 QE should be lower power on average than the S08, right? Well, not necessarily. Both the S08 QE and V1 QE use the exact same peripherals. Therefore, the V1 doesn’t get a performance advantage when a peripheral’s operation is the only thing preventing a return to a low power mode. For instance, if an IIC transmission is the only task left before entering stop2 mode, the IIC doesn’t run any faster on V1 just because the CPU is more powerful. Both MCUs will have to wait the same amount of time for the transmission to complete.

Also, these peripherals were designed for 8-bit CPUs. So the S08 is very efficient when it comes to setting up and using the on-chip peripherals. The V1 does have 8-bit instructions to improve its efficiency with these peripherals, but this does limit its performance advantage over the S08. So when much of the CPU’s time is spent accessing peripherals versus pure data manipulation, the V1’s energy use per task is not much different than the S08’s.

Which to Choose?
As you can see, there is not a simple answer to choosing the right CPU core for obtaining the lowest power. In general, if the application requires a fair amount of number crunching, particularly 16-bit and 32-bit data, then the V1 will probably be the best choice. Conversely, if the application requires the CPU to spend more time configuring and waiting on peripherals than number crunching, then the S08 will likely be the best choice.

Of course, if you think you made the wrong choice, the compatibility of the Flexis MCUs makes switching to the other core a piece of cake!

-Scott

h1

Low Power Component Architecture

September 18, 2007

Keep It Simple …

In the progression of things, circuits are used to build modules and modules are used to build components. Component architecture is how the modules are connected to perform a specific function. The best way to save power on a component is to build onto the component only what is needed to do the required functions. All extraneous options add area and complexity, which in turn usually increases the component’s power consumption.

Once the minimum set of modules is determined, then it’s important to know how the modules are connected together to allow the data to flow through the system. Basically, getting the most work done per clock cycle is more important than raw MHz. By using direct memory access (DMA) modules and cross-bar switches, moving data on a component can be made more efficient. DMA’s can save significant power by allowing data on the component to move from one location to another without the assistance of the large general purpose core(s). Cross-bar switches enable multiple data paths to simultaneously send data from one module to another, thus generating more work per clock cycle.

Turn It Off …

For leakage control, some form of power gating is normally used on a per-module basis. Power gating techniques include:

  • State retention power gating
  • Save and restore power gating
  • Basic power gating

Along with architecting the module connectivity for low power, components can also be designed to operate in different power modes. Power modes can have names such as RUN, RUN-HIGH, WAIT, DOZE, HIBERNATE, STOP, SLEEP, DEEP SLEEP, OFF, etc. Each component will have its own set of power modes. They are defined for a component with the intention that software can match the application’s requirements to the capabilities of the hardware.

When selecting a component for a system, you need to know if it has all the necessary modules to perform the required functions without a lot of extra “bells and whistles” that your system does not need. You should also understand how the architecture allows data to be moved around within the chip. And finally, you should find out about the power modes and whether or not they will be useful for your application(s).

– Chris

h1

Brownout protection in low power designs

September 11, 2007

A frequent question that comes up about low power designs using our microcontrollers has to do with brownout detection. I’d like to use this week’s posting to address the MCU features that help protect these devices from brownouts.

What happens in a brownout?

There are two main problems a brownout can cause. First, if the VDD reaches a point where the logic is still operating properly but the program memory (usually flash) does not read correctly, a runaway code condition can occur, and it continues until the VDD rises back to a safe operating range and a reset occurs. In this case, the danger is only when the CPU is actively executing code. If the MCU is in a low-power mode where the memory is not being accessed, the runaway code condition can’t occur.

Second, when the VDD falls below the digital logic’s safe operating level, brownouts can corrupt the RAM and registers content, which, if undetected, can result in unexpected operation of the application. In this case, even if the device is in a low-power mode, the corrupted data can still cause problems when the MCU wakes from the low-power state, even after the VDD has returned to a safe operating level.

Features for protecting against brownouts

Freescale MCUs have two primary features to protect against brownouts: a low voltage detector (LVD) and a power-on reset (POR). The MCUs also have system protection features (watchdog, illegal address and illegal opcode resets) that help recover from improper operation should a brownout occur.

Low voltage detection
The LVD can protect against both brownout cases listed above. LVD module features vary somewhat between devices, but in all cases the LVD can be configured to generate a reset when the VDD falls below the LVD trip point. The trip point is chosen to cover the MCU’s appropriate safe operating point.

Now one of the drawbacks of the LVD is that it consumes extra current when operating. On the 8-bit S08 and 32-bit ColdFire® V1 MCUs it requires the internal voltage regulator to be running, which consumes roughly 70 uA of current. Therefore, you typically want to disable the LVD when in the low power stop modes. These LVDs have the option to automatically disable detection when entering stop mode and re-enable detection upon exit from stop mode.

So this provides protection when the MCU is in run mode, but how do we protect against brownout in stop modes?

Power-on reset

Many of the 8-bit HC08 and S08 MCUs and all of the ColdFire V1 MCUs have an active POR versus a passive POR used on older devices. This active POR sets the POR trip point at the level where the digital logic is operational. Therefore, if the VDD falls below the point where RAM and registers can be corrupted, a POR occurs and holds the device in reset until the VDD recovers and the device can be re-initialized.

Because the POR doesn’t release until the chip logic is functional, the LVD circuit will be operational once the POR releases reset. Since most MCUs will enable the LVD when a POR occurs, the MCU is further protected until VDD reaches a safe operating point for the program memory.

Unlike the LVD, the active POR consumes very little power, only about 100-200 nA. Also, unlike the LVD, the active POR is not optional. It is always on, even in the low power stop modes, so there is no lapse in coverage.

So with the always-on protection of the POR and use of the optional LVD reset, you can have excellent protection against brownout conditions, even in low power modes, without significant impact to your battery life.

-Scott

h1

Low Power Circuit Techniques

September 4, 2007

Work Takes Energy

It takes energy to perform work, whether it is physical work, such as digging a ditch, or electrical work like playing an MP3 file. The tools may be different for physical work as compared to electrical work, but the idea is that the tools will allow the work to be done more efficiently using the least amount of energy. For instance, you could dig a ditch using a teaspoon, but it would take a lot more energy than if you used a shovel. The tools used to do electrical work are circuits. Some circuits are designed to be more efficient than others, even though they may perform the same function. We are interested in designing circuits that are energy efficient when performing the necessary work.

Working Efficiently

There are multiple ways to design efficient circuits, but it boils down to controlling active currents, static currents and leakage currents. Active current is frequency dependent, leakage current is temperature dependent and static current tends not to be either frequency or temperature dependent. There are several techniques to address each one of these types of currents, including, but not limited to:Active currents:

  • Reduced voltage
  • Dynamic voltage and frequency scaling
  • Accelerators
  • Asynchronous circuits

Static currents:

  • Reduced voltage
  • Better bias current circuits
  • Power gating

Leakage:

  • Reduced voltage
  • State retention power gating
  • Save and restore power gating
  • Basic power gating

When selecting a component for your system, identifying and understanding the power control techniques implemented on the component will help you make the right selection for your end product. Each of these techniques will be described in future posts to help you understand what they are and how they may (or may not) impact your end system. Please let me know if there are other topics that interest you.

– Chris