Cpu minimum frequency ? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
boguslaw

Cpu minimum frequency ?

Post by boguslaw »

How can be set the minimum frequency of 480Mhz ? I need it for reliable reading db18s20 Dallas temperature sensor.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Cpu minimum frequency ?

Post 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
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
boguslaw

Re: Cpu minimum frequency ?

Post 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 ?
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Cpu minimum frequency ?

Post 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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
thomaspfeiffer

Re: Cpu minimum frequency ?

Post 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
FilHype

Re: Cpu minimum frequency ?

Post 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,
Post Reply