Page 1 of 1

SAMA5D35-EK - Changing Core Frequency on the Fly

Posted: Mon Apr 06, 2015 7:24 am
by dbravo
Hello,



I am trying to change the core frequency of the core clock to run some performance tests at different frequencies. I am using devmem2.c[1] to access the PMC_MCKR and CKGR_PLLAR registers. Every time I make a change to these registers, the terminal freezes and the board must be restarted. I've tried using a serial connection and an ssh connection.

Is there a sequence of steps I have to follow in order to change the core frequency while the OS is running? Is it possible to change the frequency during the booting phase?


Cheers.

[1] http://www.lartmaker.nl/lartware/port/devmem2.c 

Re: SAMA5D35-EK - Changing Core Frequency on the Fly

Posted: Wed Apr 08, 2015 2:52 am
by blue_z
dbravo wrote:I am trying to change the core frequency of the core clock to run some performance tests at different frequencies. I am using devmem2.c[1] to access the PMC_MCKR and CKGR_PLLAR registers.
You should have performed some research/analysis before you experimented with those HW registers.
E.g. search the SoC datasheet for "MCK" to get an idea of the ramifications of modifying the Master Clock.
dbravo wrote:Every time I make a change to these registers, the terminal freezes and the board must be restarted.
That's not surprising, given that the baud rate generator is dependent on MCK.
You may have also mucked up DRAM controller timing.

Regards