Change CPU Clock speed

brad
 
Posts: 31
Joined: Tue Jan 06, 2015 5:19 am

Change CPU Clock speed

Tue Jan 06, 2015 5:21 am

How do you set the CPU clock speed in openwrt before compile the image? I don't have a need for 400Mhz and want to clock it down to reduce power and heat.

brad
 
Posts: 31
Joined: Tue Jan 06, 2015 5:19 am

Re: Change CPU Clock speed

Sat Aug 22, 2015 12:02 pm

I just thought I should answer my own question. You can reduce the CPU down to 12Mhz - which is the lowest. Have a try, it wont hurt anything and changes back to normal on power cycle.

This is for 36Mhz cpu clock (1/0xA)*360=36:
Code: Select all
mmio 0x1000003c 0x03040a01


This for 180Mhz 1/2*360=180:
Code: Select all
mmio 0x1000003c 0x03040201


this for 12Mhz 1/30*360
Code: Select all
mmio 0x1000003c 0x03041e01


this for 360Mhz
Code: Select all
mmio 0x1000003c 0x03040101


These definitely make a difference to the speed. If you make a loop that counts you can see the difference..

running CPU at 100%, ethernet plugged in, and wifi off, I get these results with 5v input:
360Mhz: 200mA
180Mhz: 170mA
90Mhz: 160mA
45Mhz: 160mA
36Mhz: 155mA
12Mhz: 150mA

brad
 
Posts: 31
Joined: Tue Jan 06, 2015 5:19 am

Re: Change CPU Clock speed

Wed Sep 02, 2015 9:50 am

Just an update, I've been reading the 5350 docs a bit more and noticed the auto CPU scaler. It also works. Thus giving max CPU speed when needed, but reducing heat and power consumption when doing nothing.

Code: Select all
mmio 0x10000044 0x80020133


I just put this in the /etc/rc.local and after boot the cpu goes into auto clock speed mode. ;)

augin
 
Posts: 3
Joined: Wed Sep 09, 2015 12:00 pm

Re: Change CPU Clock speed

Wed Sep 09, 2015 12:17 pm

Hi! How to install MMIO util?

Vonger
 
Posts: 764
Joined: Sun Oct 19, 2014 6:00 am

Re: Change CPU Clock speed

Tue Sep 15, 2015 8:32 am

Please read my blog http://vonger.cn/?p=1880

l4chsalter
 
Posts: 7
Joined: Tue Jan 27, 2015 7:21 pm
Location: Hamburg, Germany

Re: Change CPU Clock speed

Mon Sep 28, 2015 8:40 pm

Hi Guys,

i just had a look at the RT5350 Datasheet but unfortunatly i don't get how you obtained the adresses for the mmio command. Maybe you can explain that a little?
For example for the CPU Clock Auto Dynamic Control on page 29: i get the Register Description base is at 0x1000_0000 and that CPU_CLK_AUTO_CFG has a offset of 0x0044. Therefore the first part:

Code: Select all
mmio 0x10000044


But how did you come up with the second part:
Code: Select all
0x80020133


Thanks in advance

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: Change CPU Clock speed

Tue Sep 29, 2015 12:21 pm

You use the bit table to put together a number (in binary) for the parameter values you want, the hex representation is just to make it easier for humans to interpret.

Working backwards -

Hex -
0x80020133 =

Binary -
10000000000000100000000100110011 =

Parameters -
CPU AUTO CLK EN = 1 = Enable
CLK ADJ STEP = 00010 = 2
UTL PERIOD = 0001 = 1
UTL HI MARK = 11 = 87.5%
UTL LO MARK = 11 = 50%

brad
 
Posts: 31
Joined: Tue Jan 06, 2015 5:19 am

Re: Change CPU Clock speed

Tue Sep 29, 2015 2:40 pm

Thanks nobelpepper. Saved me the time. :D

l4chsalter
 
Posts: 7
Joined: Tue Jan 27, 2015 7:21 pm
Location: Hamburg, Germany

Re: Change CPU Clock speed

Tue Sep 29, 2015 6:17 pm

Thx noblepepper for detailed explanation

Now that i know it, it seems obvious :D

Return to VoCore & VoCore+Dock

Who is online

Users browsing this forum: Google [Bot] and 3 guests