How to check current DDR clock frequency at runtime

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to check current DDR clock frequency at runtime

跳至解决方案
3,917 次查看
namanthaker
Contributor IV

Hello,

I am using i.MX8M Mini EVK with Yocto L5.4.47-2.2.0 package and Android 9.0. I want to check the DDR clock frequency at runtime through sysfs or some utility.

I am read the CPU frequecy at runtime using below commands:
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq
cat /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_cur_freq
cat /sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_cur_freq

I am looking for something similar for DDR clock.

Please help to suggest the sysfs entry or utility to get the current DDR clock frequency.

Regards,
Naman

标签 (1)
0 项奖励
回复
1 解答
3,867 次查看
namanthaker
Contributor IV

Hi @joanxie,

Thank you for suggesting the DDR tool.

This DDR tool requires the device to be in Serial Download mode. I need to check the DDR frequency at runtime while running my application in Android.

For this dump-clocks.sh script can be used from below link:
https://source.codeaurora.org/external/imx/imx-test/tree/test/mxc_clock_test?h=imx_4.14.78_1.0.0_ga

This script will give the dram_core_clk value like below:
dram_core_clk --- 000010a0 1 1 800000000

"dram_core_clk=800" means DRAM Clock=1600 (DDRC PHY PLL multiplies the input frequency by 2 to generate the DDR clock), Data Rate=3200.

Regards,
Naman

在原帖中查看解决方案

0 项奖励
回复
2 回复数
3,891 次查看
joanxie
NXP TechSupport
NXP TechSupport
0 项奖励
回复
3,868 次查看
namanthaker
Contributor IV

Hi @joanxie,

Thank you for suggesting the DDR tool.

This DDR tool requires the device to be in Serial Download mode. I need to check the DDR frequency at runtime while running my application in Android.

For this dump-clocks.sh script can be used from below link:
https://source.codeaurora.org/external/imx/imx-test/tree/test/mxc_clock_test?h=imx_4.14.78_1.0.0_ga

This script will give the dram_core_clk value like below:
dram_core_clk --- 000010a0 1 1 800000000

"dram_core_clk=800" means DRAM Clock=1600 (DDRC PHY PLL multiplies the input frequency by 2 to generate the DDR clock), Data Rate=3200.

Regards,
Naman

0 项奖励
回复