2021-02-27 02:33 AM
I noticed that even if I create a new project using STM32CubeMX IDE for STM32MP157F-EV1 board, in the clock configuration, the MPUSS_CK is 650MHz. In Linux, I can see the CPU frequency is 650MHz only. How can I clock the CPU to 800MHz as supported by the SoC?
Solved! Go to Solution.
2021-03-08 06:06 AM
Hi @Subhajit.Ghosh ,
Which version of CubeMX and OpenSTLinux are you using ?
STM32MP157F-EV1 require at least OSTL Openstlinux-5.4-dunfell-mp1-20-06-24 and CubeMX V6.0
Did you test with the default Starter Package provided ?
If not already done you can refer to :
https://wiki.st.com/stm32mpu/wiki/How_to_change_the_CPU_frequency
Olivier
2021-03-08 06:06 AM
Hi @Subhajit.Ghosh ,
Which version of CubeMX and OpenSTLinux are you using ?
STM32MP157F-EV1 require at least OSTL Openstlinux-5.4-dunfell-mp1-20-06-24 and CubeMX V6.0
Did you test with the default Starter Package provided ?
If not already done you can refer to :
https://wiki.st.com/stm32mpu/wiki/How_to_change_the_CPU_frequency
Olivier
2021-03-22 11:16 PM
Hi Olivier,
Apologies for replying late. Thanks for the link.
Did a little bit of digging and found the same link which you have shared and managed to fix the issue.
Yes, we are using the Dunfell release.
The issue was:
We started initial development using the stm32mp157c variant which supports 650MHz.
We were using the device tree source file for tf-a spitted out CubeMX for the "c" variant
in which "stm32mp15xc.dtsi" was included, now the OPP table in this only contains definitions for 650MHz.
After inclusion of "stm32mp15xf.dtsi" for tf-a, there are two operating points now - 400MHz and 800MHz
as per the well written article in the link.
For testing did the following from userspace:
## This shows the current frequency in KHz, below output shows that the CPU is running in 400MHz ##
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq
400000
## This shows the CPU frequency scaling policies available in the linux kernel
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors
conservative userspace powersave ondemand performance schedutil
## This shows which policy is currently active.
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
ondemand
## This changes the policy to "userspace", so that user can manually input the frequency.
# echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
## Now we can manually change the frequency to 800MHz.
# echo 800000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed
## This shows that the current CPU frequency is switched to 800MHz.
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq
800000
Regards,
Subhajit Ghosh