Replies: 3 comments 3 replies
-
You have to call CPUThrottle.Update() in your application's main loop from
time to time (at least all 4 seconds).
|
Beta Was this translation helpful? Give feedback.
1 reply
-
SetOnTemperature() does not call the registered callback. This is only done by
Update(). I assume that it can be called from Core 3, but the callback will be
called on this core too then.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
The CPU throttle callback is triggered from the firmware, when one of the
conditions occurs, which can be selected with the mask parameter. The
SystemStateSoftTempLimitOccurred condition uses the the maximum SoC
temperature here, which is reported by the firmware (85°C). This is different
from the value, which is set with socmaxtemp=, which is enforced by Circle
CCPUThrottle itself, not by the firmware.
So when the callback is not called, no one of the system throttled conditions
has been triggered. I have to admit, that I haven't tested this for a while.
Changes to the firmware API sometimes occur.
You don't need to call CPUThrottle.SetOnTemperature(), if you call
CPUThrottle.Update(). Both do nearly the same, but Update() also checks the
system throttled state and ensures, that it is not called too frequently. If
Update() is called, when the last call to it was later than 4 seconds ago, the
call is simply ignored. So you can call Update() all the time, without the
need to care about the timing.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
on a RPi4 I tried to monitor/control the temperature when throttling should happen.
To test this cmdline.txt;
The code:
which results in:
So it seems that
socmaxtemp=...
incmdline.txt
has no effect -CPUThrottle.GetMaxTemperature()
still delivers 85C, so my handler is not called as I've not reached 85 degrees.What am I doing wrong?
thx, pottendo
Beta Was this translation helpful? Give feedback.
All reactions