imx7: generic timer frequency

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx7: generic timer frequency

1,316 Views
vsiles
Senior Contributor I

Hi,

the ARM ARM states the CNTFRQ should be correctly set during the boot so that generic timer are usable at runtime.

With my last board (ls1021a) the reference manual was pretty explicit regarding the value of the system clock frequency to use. I'm trying to do the same on a Cortex-a7 cpu of iMX7 board, and I'm not sure what is the reference system clock frequency to set in CNTFRQ.

My vendor U-boot is setting CNTFRQ to 8Mhz but I'm not sure why.

Should I read the frequency of the ARM_A7_CLK_ROOT ?

Labels (1)
Tags (2)
0 Kudos
3 Replies

847 Views
vsiles
Senior Contributor I

From the functional description of clocks, I think that ARM system clock frequency will be 800Mhz (5.2.6.1 Input Clocks in the reference manual, also uboot source code), but I don't understand the Clock Tree (5.2.4) where we can read:

ARM PLL -> /2  -> ARM_PLL_CLK

Does it mean that ARM PLL is 800 Mhz and ARM_PLL_CLK is 400 Mhz or that ARM PLL is 1.6 Ghz and ARM_PPL_CLK is 800 Mhz ?

0 Kudos

847 Views
falstaff
Senior Contributor I

Hi Vincent,

I don't think that the frequency of ARM_A7_CLK_ROOT is related to the ARM Generic Timer frequency. 800 MHz would be far too fast.

The ARM Architecture Reference Manual states (chapter B8.1.1)

Frequency Increments at a fixed frequency, typically in the range 1-50MHz.

I just verified the timer in U-Boot to provide routhly correct delays (e.g. use sleep 10 && echo Done and check with an external measurement). Therefor I am pretty sure 8MHz is the right value. But I also did not found a note about the Generic Timer clock speed in the i.MX 7 Reference Manual.

Best regards,

Stefan

847 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vincent

on Clock Tree (5.2.4)  ARM_PLL and ARM_PLL_CLK both the same, 800 Mhz .

1.jpg

/2 produced by DIV_SELECT in CCM_ANALOG_PLL_ARM register.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos