GPT Timer

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

GPT Timer

1,286 Views
john71
Senior Contributor I

I work with IMX6DQ. I want GPT timer to tick every 1ms in the Free-Run  mode.

So as I see in clock source

8–6
CLKSRC
Clock Source select.
000 No clock
001 Peripheral Clock (ipg_clk)
010 High Frequency Reference Clock (ipg_clk_highfreq)
011 External Clock
100 Low Frequency Reference Clock (ipg_clk_32k)
101 Crystal oscillator divided by 8 as Reference Clock (ipg_clk_24M)
111 Crystal oscillator as Reference Clock (ipg_clk_24M)
others Reserved


As I understand only Peripheral Clock is available for me. I see that Peripheral Clock = 528000000. So in order to get 1ms tick I need a divider 528000.

But with all available prescalers

PRESCALER Prescaler bits.
0x000 Divide by 1
0x001 Divide by 2
... ...
0xFFF Divide by 4096


I can not get such a divider.

What should I do?

4 Replies

943 Views
igorpadykov
NXP Employee
NXP Employee

Hi Evgeny

other clock sources also are available, also ipg_clk < 528000000
and max. frequencies are given in Table 18-4. System Clock
Frequency Values i.MX6DQ Reference Manual
https://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf

One can check gpt example in bare metals sdk (zip available on SMP Enable in IMX6 )

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

0 Kudos

943 Views
john71
Senior Contributor I

Thank you.

I didn't find bare metals examples for iMX6.

0 Kudos

943 Views
john71
Senior Contributor I

Thank you very much. One more question - in what environment I can load the SDK?

0 Kudos