Created
April 9, 2015 00:15
-
-
Save srvm/0612054d8cec823069bc to your computer and use it in GitHub Desktop.
Script to set core and memory frequencies on the NVIDIA Jetson TK1 board.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
echo "Format: set_clocks.sh <core_clock (kHz)> <mem_clock (kHz)>" | |
exit -1 | |
fi | |
echo "Supported core clocks:" | |
cat /sys/kernel/debug/clock/gbus/possible_rates | |
echo "" | |
echo "Supported memory clocks:" | |
cat /sys/kernel/debug/clock/emc/possible_rates | |
echo "" | |
echo -n "Current core clock: " | |
cat /sys/kernel/debug/clock/gbus/rate | |
echo -n "Current memory clock: " | |
cat /sys/kernel/debug/clock/emc/rate | |
echo "" | |
echo $(($1 * 1000)) > /sys/kernel/debug/clock/override.gbus/rate | |
echo 1 > /sys/kernel/debug/clock/override.gbus/state | |
echo -n "New clock rate: " | |
cat /sys/kernel/debug/clock/gbus/rate | |
echo $(($2 * 1000)) > /sys/kernel/debug/clock/override.emc/rate | |
echo 1 > /sys/kernel/debug/clock/override.emc/state | |
echo -n "New memory clock rate: " | |
cat /sys/kernel/debug/clock/emc/rate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment