Clock sources for timers (i.MX6Q SDP)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Clock sources for timers (i.MX6Q SDP)

ソリューションへジャンプ
9,016件の閲覧回数
jotes
Contributor IV

Hello everyone!

I have 2 questions related to clock sources on i.MX6Q SDP. I'm using L3.0.35_4.0.0_130424, CPU frequency is 996 MHz.

1) What is the frequency of the ARM private timer's clock? Is it IPG_CLK_ROOT, ½ of ARM_CLK_ROOT, or maybe something else?

2) How to set the clock input source for EPIT to ipq_clk (Peripheral clock)? According to i.MX 6Dual/6Quad Applications Processor Reference Manual it should be done by setting bit 24 in EPITx_CR register. But as I observed, EPIT starts only when CLKSRC is set to Low-frequency reference clock (bits 24 and 25 are set).


Thanks!

ラベル(2)
0 件の賞賛
返信
1 解決策
5,003件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

Hi, Jotes

     1. ARM's private timer's freq is 1/2 of ARM freq, we call it local timer.

     2. Programme 2b'01 to EPITx_CR bit 24-25 is to set its clock source to ipg clock, then you should set bit 0 of EPITx_CR to enable EPIT, and you also need to make sure its clock gate is ungated, via setting CCM_CCGR1_CG6 to 2'b11, then you will see EPIT start counting down from 0xffffffff. I tried setting CCM_CCGR1_CG6, then write 0x1000001 to EPIT1_CR, I can see it is running, and its freq is 66MHz, which is IPG's freq. I think you didn't enable its clock in CCM_CCGR1_CG6, please try it.

元の投稿で解決策を見る

0 件の賞賛
返信
24 返答(返信)
477件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

I am confused. Did you use our BSP code? I still suspect you have WAIT mode enabled and sometimes ARM clock is disabled so you get wrong freq. if you are using freescale linux BSP, you can try adding "enable_wait_mode=off" to uboot command line.

477件の閲覧回数
jotes
Contributor IV

You were right, after adding "enable_wait_mode=off" arm_clk_root is equal 400 MHz.

Thank you very much! You helped me a lot!

0 件の賞賛
返信
5,004件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

Hi, Jotes

     1. ARM's private timer's freq is 1/2 of ARM freq, we call it local timer.

     2. Programme 2b'01 to EPITx_CR bit 24-25 is to set its clock source to ipg clock, then you should set bit 0 of EPITx_CR to enable EPIT, and you also need to make sure its clock gate is ungated, via setting CCM_CCGR1_CG6 to 2'b11, then you will see EPIT start counting down from 0xffffffff. I tried setting CCM_CCGR1_CG6, then write 0x1000001 to EPIT1_CR, I can see it is running, and its freq is 66MHz, which is IPG's freq. I think you didn't enable its clock in CCM_CCGR1_CG6, please try it.

0 件の賞賛
返信
480件の閲覧回数
Yuri
NXP Employee
NXP Employee

Please use the Platform SDK, take a look at  Chapter 8 (Configuring the EPIT Driver) of "iMX6_Firmware_Guide.pdf"

in SDK docs.

https://www.freescale.com/webapp/Download?colCode=i.MX6_PLATFORM_SDK&location=null&fpsp=1&WT_TYPE=La...

i.MX6Q Product Summary Page