Page 1 of 1

Cpu minimum frequency ?

Posted: Tue Feb 07, 2017 10:51 am
by boguslaw
How can be set the minimum frequency of 480Mhz ? I need it for reliable reading db18s20 Dallas temperature sensor.

Re: Cpu minimum frequency ?

Posted: Tue Feb 07, 2017 1:41 pm
by Fourdee
boguslaw wrote:How can be set the minimum frequency of 480Mhz ? I need it for reliable reading db18s20 Dallas temperature sensor.
Depends on the device, but this should do it:

Code: Select all

echo 480000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

Re: Cpu minimum frequency ?

Posted: Tue Feb 07, 2017 6:01 pm
by boguslaw
Thank you, I'm using Orange Pi Zero. I found that sometimes I cannot read from /sys/bus/w1/devices/28*/w1_slave and it is probably due to low frequency of cpu causing bug in temperature computation.

Is there any other workaround to make readings from Dallas ds18b20 1-wire thermometer reliable all the time ?

Re: Cpu minimum frequency ?

Posted: Tue Feb 07, 2017 7:27 pm
by Fourdee
boguslaw wrote:Is there any other workaround to make readings from Dallas ds18b20 1-wire thermometer reliable all the time ?
Wish I could help, but I have absolutely no idea, sorry. Hopefully someone else with experience can chip in here.

Re: Cpu minimum frequency ?

Posted: Sat Feb 11, 2017 1:38 pm
by thomaspfeiffer
boguslaw wrote:Thank you, I'm using Orange Pi Zero. I found that sometimes I cannot read from /sys/bus/w1/devices/28*/w1_slave and it is probably due to low frequency of cpu causing bug in temperature computation.
I have similar issues with FriendlyArm's NanoPi NEO Air: http://www.friendlyarm.com/Forum/viewto ... f=47&t=393
Is there any other workaround to make readings from Dallas ds18b20 1-wire thermometer reliable all the time ?
It's still a workaround: Whenever reading the DS18B20 (in my case every 60 seconds), i start a second process which consumes cpu time. The python code can be found here: https://github.com/thomaspfeiffer-git/r ... /DS1820.py

Additionally i ordered a 1-wire to I2C device (DS2482-100). This might be a working work-around as well.

Thomas

Re: Cpu minimum frequency ?

Posted: Sat Sep 23, 2017 9:18 am
by FilHype
Hello,
Now the v156 of DietPi as an new config option :
DietPi-Config | Performance > CPU: Added support for setting minimum CPU frequencies.
Best regards,