Snooze Mode Dramatically Reduces Power Consumption in 16-bit MCUs

作者:Nelson Quintana

投稿人:DigiKey


Low power consumption has become a mandatory feature of MCUs. This article explains the use of the Renesas Snooze function and presents an example application in which an average current savings of 31 percent is achieved.


The need for low power operation has grown dramatically for designers over the last several years, especially in portable electronic devices for consumer, industrial, office and medical applications, where buyers have demonstrated an unrelenting desire for increased operating life, smaller size, and sophisticated features.

To support these end-user demands, Renesas has introduced its RL78/G12 and RL78/G13 MCU groups in the 16-bit MCU space.

In addition to excellent general low power characteristics, the RL78 family has some specific functions that further reduce operating power by allowing major sections of the device to be turned off, while still permitting key peripheral blocks to continue functioning. In particular, the RL78 adds a Snooze mode for the convenience of the system designer. This capability allows the power consumption of many typical MCU functions to be dramatically reduced by allowing common data acquisition or data transmission functions to operate without the need to ‘wake-up’ the CPU. This operational flexibility is a significant advantage over other low-power modes in which the CPU must remain active and assist with common peripheral functions.

For example, in the RL78/G13 Snooze Mode the A/D converter can complete a conversion without waking up the CPU. This saves a significant amount of power since an A/D conversion running in Snooze Mode requires only 0.5 mA instead of the 5 mA required if the Run Mode is used. This article explains the use of the Snooze feature, in the context of the overall low-power capabilities of the RL78, via a design example application, one that periodically measures an analog signal and issues an alert if the signal wanders outside of the operating range.

Two different implementations are presented: one that doesn’t use Snooze Mode operation and one that does. Datasheet numbers from the RL78/G13 MCU group will be used for the comparisons. We will show that for this typical example a 31 percent savings in power dissipation is achieved when the Snooze Mode is used over an implementation without a Snooze function.

RL78 features

The RL78 family evolved from two popular Renesas MCU families, the 78 K, and the R8C. The design of the RL78 leverages the years of experience behind these product families including the CPU core and the large variety of proven peripheral functions. This allows software resources that were used with previous 78K and R8C products to be reused effectively.

The RL78/G12 and RL78/G13 groups feature on-chip single-power-supply flash memory from 2 KB to 512 KB, RAM data memory from 0.25 KB to 32 KB and Flash data memory up to 8 KB. The wide operating range, from 1.6 V to 5.5 V, makes it easy to use in battery-based applications where the voltage may vary over time as the battery is gradually discharged. In the Run Mode the RL78/G13 delivers 41 DMIPs at 32 MHz while requiring only 66 uA/MHz operating current. This allows important functions to be completed as quickly as possible and thus significantly reduces current drain during key operations. Figure 1 below shows key elements of the RL78/G13 MCU.

Key elements of RL78/G13

Figure 1: Key elements of RL78/G13.

The RL78/G13 offers a full featured DMA Controller, Clock Generation, Power on Reset, Low Voltage Detector, hardware support for complex arithmetic functions (16-bit by 16-bit multiply, 32-bit by 32-bit divide, 16-bit by 16-bit multiply with 32-bit accumulate) and a single wire Debug Interface to speed development. Safety features include special self-diagnostics and error checking functions that improve system reliability.

Four basic modes

Common strategies to cut power consumption include reducing clock frequencies or turning off some peripherals when they are not needed. These techniques may trim average current to a few milliamps or less. Another method makes use of a timer, like an RTC, to maintain system control, while allowing the CPU and peripherals to be stopped most of the time. Here it is usually possible to get average currents down to 10’s or 100’s of microamps. When a system is allowed to be completely inactive until needed, with an interrupt used to wake-up the chip, even lower currents, typically less than a microamp, can be achieved.

The RL78 provides system designers with great flexibility in dynamically tuning the MCU state to minimize power use. It has four basic modes – Operating, Halt, Snooze, and Stop. An operational flow diagram for these modes is shown in Figure 2 below. Each has different power characteristics.

RL78/G13 devices have exceptional low-power characteristics in standby operation; i.e., in the Halt or Stop Modes. For example, they have a low 0.57 μA current requirement in the Halt Mode when using the 32 kHz internal oscillator with the Real-Time Clock (RTC) and Low-Voltage Detector (VLD) functions running. This performance keeps current drain low while the chip waits between periodic operations, a common scenario in battery-based designs.

Flow diagram for four operating modes

Figure 2: Flow diagram for four operating modes.

In the Halt mode the CPU clock is disabled to save power, but all peripheral functions are operable and the main clock or sub clock can remain active. The active clock allows the CPU to restart instantly. Peripherals, such a DMA controller, operate unimpeded – for instance transferring data between a peripheral and memory with no CPU intervention.

With the clock running at the maximum 32 MHz level for peripheral usage, current draw is 1.1 mA in Halt mode compared to 5.1 mA in Operating mode.

In the STOP mode, which enables the lowest possible power consumption, the high-speed system clock oscillator and internal high-speed oscillator are disabled, stopping the whole system. A 32 kHz sub-clock can still operate in Stop mode keeping the real-time clock (RTC) and 12-bit interval timer active. Moreover, the Low-Voltage Detect (LVD) circuit, the watchdog timer, and external interrupts are active. All of the active sources can awaken the CPU to Operating mode. The MCU typically draws 0.57 µA in Stop mode with RTC and LVD enabled.

Introducing the snooze mode

In the Snooze Mode, some peripheral function can ‘wake-up’ and execute simple operations without ‘waking’ the CPU. This is accomplished when a data reception event is triggered by specific peripherals by exiting the Stop Mode and enabling the appropriate peripheral clock needed for the operation being performed. Most peripheral functions are disabled, with some exceptions; i.e. the RTC, Interval Timer, Watchdog Timer, Power-on Reset, Low Voltage Detector, External Interrupt and Key Interrupt can all operate. Yet they, too, can be selectively disabled to save more power. The Clock output is operable only if the subsystem clock is selected as the count clock. The Timer Array Unit, Multiplier/Divider, DMA Controller, high-speed CRC, CRC operation, and illegal memory access functions all are disabled.

Data reception from, for example, a data conversion by the A/D converter can operate in the Snooze mode by waking-up when the RTC or Interval timer interrupt signals the start of a conversion. Normally, A/D conversion is stopped while in the STOP mode, but, by using the SNOOZE mode, A/D conversion can be performed without operating the CPU. The A/D conversion uses only 0.5 mA in Snooze Mode, but 5 mA in the Run Mode.

Similarly the synchronous serial port can ‘wake-up’ when the Serial Clock input pin (SCKp) edge is detected. The UART can ‘wake-up’ when an edge on the RxD input is detected. This avoids the ‘wake-up’ time associated with the normal transition from Stop to Run and can save a significant amount of power.

When the Snooze Mode transitions to the Run Mode, the wake-up time (required for clock stabilization) is 20 μsec.

In Halt mode all peripherals are operable, while in the Snooze mode the clocks to peripherals are disabled, except for ADC, UART, and CSI when configured.

Example showing the benefit of snooze operation

To gain a better understanding of the benefits of Snooze Mode operation, we will examine the power dissipation of an example design. The design selected is a common type of application that must periodically measure an analog signal. (In this case, the analog signal represents a temperature, but it could be any of a variety of periodic sensor measurements.) We first calculated the expected power dissipation without using the Snooze Mode. Next we calculated the expected power dissipation when using the Snooze Mode. A comparison of the resulting power dissipation estimates will give us a numeric measure of the advantage the Snooze Mode can provide in a common type of design.

This Remote Temperature Sensor will use the Renesas RL78/G13 MCU as the main controller to implement higher-level program functions. An on-chip A/D converter will be used to measure the temperature via an analog input pin. Temperatures will be measured using four separate sensors at four locations. A UART port will be used to communicate with the central control system using an external wireless transceiver. A serial Flash memory will store event logging data and the MCU will communicate with the memory via an SPI port. The GPIO port will be used to show measurements and status over a 7-segment LCD. A block diagram of the system is shown in Figure 3, below.

Block diagram of the remote temperature sensor

Figure 3: Block diagram of the remote temperature sensor.

The program flow for the main functions of the Remote Temperature Sensor example is shown in the next figure.

Remote temperature sensor program flow

Figure 4: Remote temperature sensor program flow.

Power use estimate

To estimate the total current needed for each operating period we can simply multiply each current component by the operation time and then add each of these together. The computation is shown in Table 1, below. The operational current during the cycle is 0.57 uA over 0.5 s so the average current is 1.14 uA.

Function

Operation - No Snooze

Current

Time

Total

Measure Temperature

5.2mA

42.8μsec

2.2256E-07 Amp-Sec

Store Event

4.7mA

8μs

3.76E-08 Amp-Sec

Wait for Event

0.62 μA

(0.5s-50.8μs)

3.1E-07 Amp-Sec

Average Current

0.57 μA

0.5s

1.14 Amp-Sec


Table 1: Average current estimate- no snooze.

The use of the Snooze mode reduces the operational current of the Measure Temperature function from 5.2 mA to 1.12 mA. The other operational currents are unchanged. The operational current during the cycle is reduced to 0.39 μA and an average of 0.791 μA for a savings of about 31 percent. See Table 2, below.

Function

Operation - Snooze

Current

Time Period

Total

Measure Temperature

1.12mA

42.8μs

4.79E-08 Amp-Sec

Store Event

4.7mA

8μs

3.76E-08 Amp-Sec

Wait for Event

0.62 μA

(0.5s-50.8μs)

3.10E-07 Amp-Sec

Average Current

0.791 μA

0.5s

3.95E-07 Amp-Sec


Table 2: Power use profile- with snooze.
Conclusion

Renesas’ RL78/G12 and RL78/G13 MCUs are recommended solutions for embedded systems that mandate low-power operation requirements because they provide advanced power-management capabilities. In addition to offering one of the lowest power consumption ratings in the industry the RL78 family also provides a power-saving snooze mode in which A/D conversion and serial communication can continue while the CPU is on standby, with the CPU only being woken up when required.

This article provided a detailed description of the Low Power modes available in the RL78/G13 family of MCUs and showed in an example application an average current savings of 31 percent was achieved by using the special Snooze function. This combination of both high performance and low power makes the RL78 an excellent fit for a wide range of power- constrained applications.

免责声明:各个作者和/或论坛参与者在本网站发表的观点、看法和意见不代表 DigiKey 的观点、看法和意见,也不代表 DigiKey 官方政策。

关于此作者

Nelson Quintana

Article authored by Nelson Quintana, Senior Marketing Manager, Consumer & Industrial Business Unit, Renesas Electronics America.

关于此出版商

DigiKey

DigiKey 总部设在美国明尼苏达州锡夫里弗福尔斯市,是一个同时针对原型开发/设计提供小批量供应、针对生产提供大批量供应的全球电子元件综合服务提供商,在 DigiKey 上提供 750 多家优质制造商品牌、六百多万种产品。