Set power profiles for Azure Sphere devices

Azure Sphere power profiles enable you to adjust the balance between performance and energy savings while your high-level application is running on an Azure Sphere device.

You can specify preferences in the form of discrete power profiles that define the balance between power savings and performance.

The Azure Sphere OS dynamically adjusts the CPU frequency to balance power consumption and performance according to the specified Power Profile.

Note

Power profiles do not persist across reboots and should always be set when your application starts.

Power profile options

Three power profile options are available:

  • PowerSaver: Indicates to the system that power savings should be prioritized at the cost of performance for high-level applications.
  • Balanced: Indicates to the system that power savings and performance for high-level applications should be balanced according to the system load.
  • HighPerformance: Indicates to the system that the best performance possible is desired for the high-level application at the cost of increased power consumption.

Note

While the system will remain fully functional at lower frequencies, there might be a slight impact on performance.

Dynamic configuration of power profiles

To enable your application to access the power profile functions at runtime, you must declare the SetPowerProfile value for the PowerControls capability in the application manifest.

At runtime, your application calls PowerManagement_SetSystemPowerProfile() to specify one of the available power profiles.

Include header files

Applications that use power profiles must include the power management header file:

#include <applibs/powermanagement.h>