changing the CPU clock to reduce the temperature?

Forum about Parallella boot process, linux kernel, distros, SD-cards, etc.

changing the CPU clock to reduce the temperature?

Postby frankbuss » Sun Aug 06, 2017 12:17 am

I have one of the Kickstarter boards, which needs a fan. I don't like this, because I plan to use it for an audio application where I don't want any background noise. So I thought maybe when I reduce the CPU clock then I don't need it. This is how I did this.

First I needed to run commands in u-boot, but looks like the boot delay was set to 0 seconds on my system. For this I needed to set the u-boot environment variables from Linux, which is possible with the u-boot tools. You can install it as root on the system:

Code: Select all
apt-get update
apt-get install u-boot-tools


Then create a new file /etc/fw_env.config:

Code: Select all
# MTD device name       Device offset   Env. size       Flash sector size
/dev/mtd1               0x0             0x20000         0x10000


Now you can show the u-boot environment variables with "fw_printenv", and on my system it showed "bootdelay=0". I changed it to 3 seconds:

Code: Select all
fw_setenv bootdelay 3


Then I connected a USB serial adapter to the RX/TX/GND pins (3.3 V) on top of the parallella board (near the ethernet connector on the outer side) and could stop the boot process with a key press in a terminal. In the Zynq-7000-TRM, you can see the description of the register ARM_CLK_CTRL on page 1593. Default value is 0x1f000400, but the Zynq FSBL changed this to another value, which you can read in u-boot with the md.l command:

Code: Select all
zynq-uboot> md.l 0xf8000120 1
f8000120: 1f000200    ....


The bits 8 to 13 are for the divider value. In order to change this register, you have to unlock write access first, and after changing it you have to lock write access again. To reduce the CPU clock to 1/4 of the normal value, I did this:

Code: Select all
mw.l 0xf8000008 0x0000df0d
mw.l 0xf8000120 0x1f000800
mw.l 0xf8000004 0x0000767b


Then I started it with the "boot" command. Before the change, a "cat /proc/cpuinfo" showed 1332.01 BogoMIPS, and after the change it was 331.77 BogoMIPS (so I guess original was 666 MHz and after the change 166 MHz?). You could change this permanently for each boot with the usual procedures, like adding the mw.l commdns to the boot commands in u-boot with setenv, and saving the environment with saveenv, or even from Linux with the fw_setenv, if you like to live risky, because if the boot command has a syntax error, your board won't boot anymore and then you need a serial port adapter to fix it. If you forgot to change the boot delay, you need even a JTAG programmer to fix it.

Unfortunately it doesn't change much the temperature. I still need a fan with the small heat sink, if I want to be below 60°C. I tried to change the DDR clock, too, but the system crashes when I write to this register. I guess this is only possible at startup, and for this I guess I would need a new FSBL, which looks like a lot of work to create and to install. Maybe I'll install just a really big heatsink instead :D

Or maybe reducing the speed of everything, including the RAM, would solve the problem? I don't need a fast system, most things will run in the FPGA later and this could work with 50 MHz. I could even disable the Epiphany chip, because I only need some high speed data transfer between the ARM core, the FPGA and external devices. Is this possible and would this reduce the temperature?
frankbuss
 
Posts: 14
Joined: Mon Dec 17, 2012 3:22 am

Re: changing the CPU clock to reduce the temperature?

Postby sebraa » Mon Aug 14, 2017 5:31 pm

frankbuss wrote:I don't like this, because I plan to use it for an audio application where I don't want any background noise.
Can you use a big, very quiet fan instead?

frankbuss wrote:I could even disable the Epiphany chip, because I only need some high speed data transfer between the ARM core, the FPGA and external devices. Is this possible and would this reduce the temperature?
The Epiphany chip does not affect the system temperature much (it should be powered down unless used). Also, it does not dissipate much energy in any case (early boards didn't even have a heatsink for it). You are purely limited by the Zynq temperature.
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: changing the CPU clock to reduce the temperature?

Postby frankbuss » Tue Aug 15, 2017 5:18 pm

sebraa wrote:
frankbuss wrote:I don't like this, because I plan to use it for an audio application where I don't want any background noise.
Can you use a big, very quiet fan instead?


Meanwhile I mounted it on a big heatsink:

viewtopic.php?f=9&t=1634#p19469

Look ma, no more fan required :lol:

I guess the Epiphany metal top is isolated? If not, I might get into trouble, because I already measured it and the screws are connected to GND (which is nice for attaching a scope GND clip).
frankbuss
 
Posts: 14
Joined: Mon Dec 17, 2012 3:22 am


Return to Linux/U-Boot

Who is online

Users browsing this forum: No registered users and 1 guest