【飞凌OK3562J-C开发板体验】+ CPU测试 使用PUTTY软件的串口功能连接开发板,通过输入命令行命令对CPU进行测试 CPU当中有很多的模块,运行的模块越多,需要的电压也就越大,功耗也就越高。因此为了尽可能降低芯片的功耗就需在芯片空闲时降低芯片电压,在工作时再进行升高。 命令行工具可以让我们很方便的对CPU进行快捷的调试 一、前期准备打开PUTTY测试软件,选择Serial,填写串口号,将波特率填写为115200,
点击OPEN打开命令调试界面
按下复位键可以看到开发板打印的信息,和信息打印的时间戳
回车后出现root@ok3562:/#便可以开始输入命令
二、测试命令查看频率电压表
root@ok3562:/# cat /sys/kernel/debug/opp/opp_summary
device rate(Hz) target(uV) min(uV) max(uV)
-------------------------------------------------------------------
platform-ff320000.gpu
300000000 900000 900000 1000000
400000000 900000 900000 1000000
500000000 900000 900000 1000000
600000000 900000 900000 1000000
700000000 900000 900000 1000000
platform-dmc
324000000 900000 900000 900000
528000000 900000 900000 900000
780000000 900000 900000 900000
1560000000 900000 900000 900000
cpu0
408000000 900000 900000 1150000
600000000 900000 900000 1150000
816000000 900000 900000 1150000
1008000000 900000 900000 1150000
1200000000 900000 900000 1150000
查看当前的CPU频率
root@ok3562:/# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq
816000
查看当前内核中支持的所有cpufreq governor类型
root@ok3562:/# root@ok3562:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
查看当前CPU支持的频率档位
root@ok3562:/# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
408000 600000 816000 1008000 1200000
userspace表示用户模式,在此模式下允许用户程序调节CPU频率。设置为用户模式,修改频率为1200000
root@ok3562:/# echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
root@ok3562:/# echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
查看修改后当前频率
root@ok3562:/# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq
1200000
查看当前的电压档位
root@ok3562:/# dmesg | grep pvtm
[ 5.170507] cpu cpu0: pvtm = 1410, get from otp
[ 5.170523] cpu cpu0: pvtm-volt-sel=2
[ 5.427182] mali ff320000.gpu: pvtm = 880, get from otp
[ 5.427248] mali ff320000.gpu: pvtm-volt-sel=3
查看leakage
root@ok3562:/# dmesg | grep leakage
[ 5.170468] cpu cpu0: leakage=24
[ 5.416458] rockchip-dmc dmc: leakage=29
[ 5.416503] rockchip-dmc dmc: leakage-volt-sel=2
[ 5.427080] mali ff320000.gpu: leakage=10
查看温度,此时温度为40.5度
root@ok3562:/# cat /sys/class/thermal/thermal_zone0/temp
40588
修改CPU1的频率
root@ok3562:/# echo userspace > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
root@ok3562:/# echo 1200000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed
root@ok3562:/# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq
1200000
修改CPU2的频率
root@ok3562:/# echo userspace > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
root@ok3562:/# echo 1008000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_setspeed
root@ok3562:
/# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq
1008000
修改CPU3的频率
root@ok3562:/# echo userspace > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
root@ok3562:/# echo 816000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_setspeed
root@ok3562:/# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq
816000
说明:修改频率时虽然指定某个CPU内核,但查询时并不指定,实际上修改某一个内核时,其他内核也会同时改变
|