Other Parts Discussed in Thread: HDC3022
hI,
How to change CPU speed when internal temperature goes to high for AM6231
Please help me on this.
Thanks,
Naresh
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hI,
How to change CPU speed when internal temperature goes to high for AM6231
Please help me on this.
Thanks,
Naresh
Hello Naresh,
Thank you for the query.
How to change CPU speed when internal temperature goes to high for AM6231
Please elaborate your query. Is this a custom board. What is the frequency range you want to adjust?
Regards,
Sreenivasa
Hi Sreenivasa,
YYes, i am using custom board.
Iam using AM6231 soc.
Thanks,
Naresh
Hello Naresh,
Thank you.
Please elaborate your query. Is this a custom board. What is the frequency range you want to adjust?
Could you please elaborate your query.
I am reassigning to the expert to support.
Please expect delay in response due to the yearend holidays.
Regards,
Sreenivasa
Hi Naresh,
Can you provide a use case for this? Is the expected outcome when temperature goes too high, the CPU speed decreases?
There are Linux "governors" that implement performance scaling algorithms that control the CPU frequency. None of these governors are based on temperature. Please see this documentation about CPUfreq and Governors: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/Documentation/admin-guide/pm/cpufreq.rst?h=ti-linux-6.1.y-cicd Please note that not all of the Generic Governors listed are implemented in the SDK.
A possible solution would be selecting one of the governors in the documentation for your use case.
Does your custom hardware use an on-die temperature sensor? If so, it may be possible to send an interrupt if the temperature goes too high and then adjust the CPU speed after the interrupt.
Best Regards,
Anshu
Hi Anshu ,
we are using humidity/temperature sensor (hdc3022).
As you said once temperature too high then we have to mitigate the cpu frequency .
suppose if temperature goes high , how did we adjust the cpu freqency ?
any alternative ways to decrease the cpu frequency when temp goes to high ?
Thanks,
Naresh
Hi Naresh,
As mentioned in the previous post, the governors is the way to do this. The simplest governor is Userspace.
You can see here how to set the governor to Userspace and adjust the CPU Frequency manually.
root@am62xx-evm:~# cd /sys/devices/system/cpu/cpufreq/policy0/ root@am62xx-evm:/sys/devices/system/cpu/cpufreq/policy0# ls -l total 0 -r--r--r-- 1 root root 4096 Jan 1 00:00 affected_cpus -r-------- 1 root root 4096 Jan 1 00:00 cpuinfo_cur_freq -r--r--r-- 1 root root 4096 Jan 1 00:00 cpuinfo_max_freq -r--r--r-- 1 root root 4096 Jan 1 00:00 cpuinfo_min_freq -r--r--r-- 1 root root 4096 Jan 1 00:00 cpuinfo_transition_latency -r--r--r-- 1 root root 4096 Jan 1 00:00 related_cpus -r--r--r-- 1 root root 4096 Jan 1 00:00 scaling_available_frequencies -r--r--r-- 1 root root 4096 Jan 1 00:00 scaling_available_governors -r--r--r-- 1 root root 4096 Jan 1 00:00 scaling_cur_freq -r--r--r-- 1 root root 4096 Jan 1 00:00 scaling_driver -rw-r--r-- 1 root root 4096 Jan 1 00:04 scaling_governor -rw-r--r-- 1 root root 4096 Jan 1 00:00 scaling_max_freq -rw-r--r-- 1 root root 4096 Jan 1 00:00 scaling_min_freq -rw-r--r-- 1 root root 4096 Jan 1 00:08 scaling_setspeed drwxr-xr-x 2 root root 0 Jan 1 00:00 stats root@am62xx-evm:/sys/devices/system/cpu/cpufreq/policy0# cat cpuinfo_cur_freq ###Current CPU Frequency in kHz 1000000 root@am62xx-evm:/sys/devices/system/cpu/cpufreq/policy0# cat scaling_available_governors ###Available Governors ondemand userspace performance schedutil root@am62xx-evm:/sys/devices/system/cpu/cpufreq/policy0# cat scaling_governor ###Currently Governor= schedutil schedutil root@am62xx-evm:/sys/devices/system/cpu/cpufreq/policy0# echo userspace > scaling_governor ###schedutil --> userspace root@am62xx-evm:/sys/devices/system/cpu/cpufreq/policy0# cat scaling_governor userspace root@am62xx-evm:/sys/devices/system/cpu/cpufreq/policy0# cat scaling_available_frequencies ###Available CPU Speeds in khz 200000 400000 600000 800000 1000000 1250000 1400000 root@am62xx-evm:/sys/devices/system/cpu/cpufreq/policy0# echo 1250000 > scaling_setspeed ###Change speed (in khz) root@am62xx-evm:/sys/devices/system/cpu/cpufreq/policy0# cat cpuinfo_cur_freq 1250000 root@am62xx-evm:/sys/devices/system/cpu/cpufreq/policy0# k3conf --cpuinfo ###Verified that speed is changed
Best Regards,
Anshu