# `cpufreq` — CPU Frequency Control

The `cpufreq` module is used to get/set the CPU frequency to save power.

Note

This module is not supported on the OpenMV Cam M4 because the CPU frequency, for various reasons, cannot be set independently of peripherals.

## Functions

cpufreq.set_frequency(supported_frequency)

  Sets the CPU frequency to a supported frequency in MHz. Peripherals frequencies are not changed. Only the CPU performance.

cpufreq.get_current_frequencies()

  Returns (cpu_clk_in_mhz, hclk_in_mhz, pclk1_in_mhz, pclk2_in_mhz).

cpufreq.get_supported_frequencies()

  Returns the supported CPU frequencies [120, 144, 168, 192, 216] on the OpenMV Cam M7 and [60/50, 120/100, 240/200, 480/400] on the OpenMV Cam H7 Rev V/XY silicon in MHz.

Language and External Links

Language
  English
  中文

External links
  openmv.io
  forums.openmv.io
  github.com/openmv/openmv
  micropython.org
  forum.micropython.org
  github.com/micropython/micropython