4.7.10. hrut_ddr_freq
hrut_ddr_freq is a tool used to obtain the current DDR (Double Data Rate) memory frequency. It retrieves frequency information by reading the following files from the Linux sysfs filesystem:
/sys/class/devfreq/soc\:ddrc-freq/name: confirms whether the device name is soc:ddrc-freq./sys/class/devfreq/soc\:ddrc-freq/cur_freq: reads the current DDR frequency in Hz.
4.7.10.1. Syntax Description
Below is the Usage output from executing hrut_ddr_freq -h:
hrut_ddr_freq -h
*** this tool is used to get current ddr frequency ***
usage: hrut_ddr_freq
No input arguments are required; simply run the command to obtain the current DDR frequency.
4.7.10.2. Command Options and Their Functions
Default Usage
Command:
root@buildroot:~# hrut_ddr_freq
Function:
This command traverses the /sys/class/devfreq directory, looks for a matching device name (soc:ddrc-freq), and reads its current frequency.
Output:
root@buildroot:/userdata/gmsl_test# hrut_ddr_freq
ddr cur_freq: 4266000000