Set CPU speed

Sometimes you might want to control the clock speed of the BeagleBone. For example in a battery-powered environment where you want to use as little power as possible, and thus want to set the BeagleBone to use a lower frequency clock speed.

In the later BeagleBone demo images, this can be done by using cpufreq-set.

Read frequency and what governor that is used:

root@beaglebone:~# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to, please.
analyzing CPU 0:
  driver: omap
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 300 us.
  hardware limits: 275 MHz - 720 MHz
  available frequency steps: 275 MHz, 500 MHz, 600 MHz, 720 MHz
  available cpufreq governors: conservative, ondemand, powersave, userspace
  current policy: frequency should be within 275 MHz and 720 MHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 275 MHz (asserted by call to hardware).
  cpufreq stats: 275 MHz:0.01%, 500 MHz:0.00%, 600 MHz:0.00%, 720 MHz:99.99%  (1)

The governor can be set to any of the values "conservative", "ondemand", "powersave", "userspace".

root@beaglebone:~# cpufreq-set --governor powersave

The minimum and maximum frequency that the governor can use, can also be set.
The frequency values that can be used are "720MHz", "600MHz", "500MHz" and "275MHz".

root@beaglebone:~# cpufreq-set -f 600MHz

When the "userspace" governor is used, the information is also available on the file system:
Read current speed:
  • cat  /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
Set speed (275MHz, 500MHz and 720MHz):
  • echo 275000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
  • echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
  • echo 720000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed