How to Modify the Clock Frequency to Reduce Microcontroller Power Consumption

Published  March 18, 2019   0
Modify the Clock Frequency to Reduce Microcontroller Power Consumption

Developers always have challenge delivering high levels of functionality and performance while simultaneously maximizing battery life. Also when it comes to electronic products, the most important feature is the battery consumption. It should be as less as possible to increase the device operation time. The power management is very critical in portable and battery-powered applications. Differences of microampere consumptions can lead to months or years of operating life which can increase or decrease the popularity and brand of the product in the market. The increase in products demand more efficient optimization of battery use. Nowadays, users demand longer battery backup with compact size of products so manufacturers are focusing on smaller battery size with super long battery life which is a questionable task. But, the developers have come up with Power Saving Technologies after going through many factors and critical parameters affecting battery life.

There are many parameters which affects the battery usage such as microcontroller used, operating voltage, current consumption, ambient temperature, Environmental condition, peripherals used, charge-recharge cycles etc. With the trend of smart products coming in the market, it is very important to first focus on the MCU used, to optimize battery life. The MCU becomes critical part when it comes to saving power in the small sized products. So it is recommended that start with the MCU first. Now, MCU comes with the different power saving techniques. To know more about minimizing Power Consumption in Microcontrollers(MCU), refer previous article. This article majorly focuses on one of the important parameter for reducing the power consumption in microcontroller, that is modifying the clock frequency which needs to be taken care when using MCU for low power applications.


Why to Modify Clock Frequency in Microcontrollers?

Out of many parameters mentioned above, the choice of clock frequency play very important role in saving power. The study shows that wrong selection of operating frequency of microcontrollers can lead to significant percentage (%) loss of battery power. In order to avoid this loss, the developers need to take care of the appropriate frequency selection to run the microcontroller. Now, it is not necessary that the frequency selection can be done initially, while setting up microcontroller, whereas it can be chosen in between the programming also. There are many microcontroller which comes with bit selection to select desired operating frequency. Also the microcontroller can run at multiple frequencies, so the developers have option to select appropriate frequency depending upon the application.


What is the effect of selecting multiple frequencies on the performance?

There is no doubt that selecting various frequencies will affect the performance of microcontroller. As in terms of microcontroller, it is very well known that frequency and performance are proportional. It means that, greater the frequency will have less code execution time and thus greater speed of program execution. So now, it is very clear that if frequency is changed then the performance will also change. But it is not necessary that developers need to stick at one frequency just for sake of higher performance of microcontroller.


Low or High Frequency, which one to select?

 It is not always the case when microcontroller has to deliver a high performance, there are several applications which need moderate performance of the microcontroller, in these type of applications the developers can decrease the operating frequency from GHz to MHz and even to minimum frequency required to run microcontroller. Although, in some cases the optimum performance is required and also execution time is critical such as when driving external flash ADCs without FIFO buffer, or in video processing and many other applications, in these areas the developers can use the optimum frequency of microcontroller. Even using in these kind of environment, the developers can code smartly to decrease the code length by choosing the right instruction.

For e.g.: If ‘for’ loop is taking more instructions and one can use several lines of instructions which utilizes less memory to do the task without using the for loop, then developers can go with several lines of instructions avoiding use of  ‘for’ loop.


The selection of appropriate frequency for microcontroller depends on task requirements. Higher frequency means higher power consumption but also more computation power. So essentially choice of frequency is a trade-off between power consumption and required computation power.

Also the main advantage of working at low frequency is low supply current besides lower RFI (Radio Frequency Interference).

Supply Current (I) = Quiescent Current(Iq) + (K x Frequency)


The second term is predominant. The RFI energy of a microcontroller is so small that it is very easy to filter.

Clock Frequency Graph to Reduce Microcontroller Power Consumption


So if application needs a fast speed, do not worry about running fast. But if power consumption is a concern, run as slower as the application allows.


Clock-Frequency Switching Technique

PLL (Phases Lock Loop) Unit always exist in a high performance MCU running at high speed. The PLL boosts input frequency to a higher frequency e.g., from 8 MHz to 32 Mhz. It is the option of the developer to choose appropriate operating frequency for the application. Some applications do not need to run at a high speed, in that case developers need to keep the clock frequency of the MCU as low as possible to run the task. However, in a fixed frequency platform, such as low cost 8-bit MCU that does not contain PLL unit, one must improve the instruction code to reduce the processing energy. Also, the MCU that contains a PLL unit cannot exploit the benefits of frequency-switching technique that allows the MCU to operate at high frequency in the data-processing period and then return to low-frequency operation for the data transmission period.

The figure explains the use of PLL unit in Frequency Switching Technique.

Frequency Switching Technique to Reduce Power Consumption


Selecting Clock Management Modes of Operation

Some of the high-speed microcontrollers support different clock management modes such as Stop mode, Power Management Modes (PMMs) and Idle mode. It is possible to switch between these modes allowing user to optimize the speed of the device while power consumption.


Selectable Clock Source

The crystal oscillator is a large consumer of power on any microcontroller, especially during low power operation. The ring oscillator, used for quick starts from Stop mode, can also be used to provide an approximately 3 to 4MHz clock source during normal operation. Although a crystal oscillator is still required at power-up, once the crystal has stabilized, device operation can be switched to the ring oscillator, realizing a power savings of as much as 25 mA.


Clock Speed Control

The operating frequency of a microcontroller is the single biggest factor in determining power consumption. The High-Speed Microcontroller family of microcontrollers supports different clock speed management modes that conserve power by slowing or stopping the internal clock. These modes allow the system developer to maximize power savings with a minimum impact on performance.


Software execution from non-volatile memory or RAM

Developers must carefully consider whether software is executed from non-volatile memories or RAM in estimating the current consumption. Executing from RAM can offer lower active current specifications; however, many applications are not small enough to execute from RAM alone and require programs be executed from non-volatile memory.


Bus clocks enabled or disabled

Most microcontroller applications require access to memories and peripherals during software execution. This requires bus clocks to be enabled and needs to be considered in active current estimates.


Using the internal oscillator

Using internal oscillators and avoiding external oscillators can save significant energy. As external oscillators draws more current resulting in more power usage. Also it is not hard bound that one should use internal oscillator, as external oscillators are advisable to use when the applications require more clock frequency.



Making a low power product starts with a choice of MCU and it is significantly difficult when diverse options are available in the market. The modification of frequency can have large impact on power usage and also give a good power consumption result. The additional advantage of modifying the frequency is that there is no additional hardware cost and it can be implemented easily in the software. This technique can be used to improve the energy efficiency of a low-cost MCU. Moreover, the amount of energy saving depends upon the difference between the operating frequencies, data-processing time and the architecture of the MCU. The energy saving up to 66.9% can be achieved when using the frequency-switching technique compared with normal operation.


At the end of the day, for developers, meeting the needs of increased system functionality and performance objectives while increasing the battery life of products, is a significant challenge. To effectively develop products that deliver the longest possible battery life – or even operate with no battery at all – requires a deep understanding of the both the system requirements and the microcontroller’s current specifications. This is much more complex than simply estimating how much current the MCU consumes when active. Depending on the application being developed, frequency modification, standby current, peripheral current may have a more significant impact on battery life than MCU power.

This article was created to help developers understand how the MCUs consume power in terms of frequency and can be optimized with modification of frequency.