How to check current DDR clock frequency at runtime

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to check current DDR clock frequency at runtime

Jump to solution
3,075 Views
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

Labels (1)
0 Kudos
1 Solution
3,025 Views
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

View solution in original post

0 Kudos
2 Replies
3,049 Views
joanxie
NXP TechSupport
NXP TechSupport
0 Kudos
3,026 Views
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 Kudos