<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get the imx6 epit clock frequency in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Get-the-imx6-epit-clock-frequency/m-p/1237104#M170055</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/68383" target="_self"&gt;&lt;SPAN class=""&gt;864535720&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;I want to use GPT as system timer and EPIT as User timer, It is possible.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;If possible then please share me the below details about EPIT,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;1. How to enable the EPIT&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;2. How to use EPIT as a user timer&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;3. If you have any patch related to EPIT use as a usr timer please share with me.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Thanks in advance....&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Feb 2021 07:16:16 GMT</pubDate>
    <dc:creator>ravis5354</dc:creator>
    <dc:date>2021-02-26T07:16:16Z</dc:date>
    <item>
      <title>Get the imx6 epit clock frequency</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Get-the-imx6-epit-clock-frequency/m-p/881123#M133559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello there&lt;BR /&gt;The board I use is the development board of the IMX6Q of NXP official website. The kernel version I am using is linux3.14.52. The problem I am having now is: I want to get the clock frequency of the EPIT, I want to calculate the time period of its counting according to its frequency. Currently, my epit timer 1 and epit timer 2 are working properly. But when I get the clock frequency of the timer, the value I get is 0. The way I get it is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct clk *timer_clk = NULL;&lt;BR /&gt;&amp;nbsp; timer_clk = clk_get_sys("imx-epit.1", "per");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (IS_ERR(timer_clk))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Printk("Get EPIT1 time_clk fail !\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return -1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Clk_value = clk_get_rate(timer_clk);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Printk("epit1 timer_clk-&amp;gt;rate = %d !kernel \n", clk_value);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last print is: epit1 timer_clk-&amp;gt;rate = 0 !kernel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get the actual frequency of the clock?&lt;BR /&gt;Because I want to use epit to achieve precise timing.&lt;BR /&gt;For example, I want to interrupt once in 1ms. What should I set the EPITLR register to be correct? At the same time, I hope to have a calculation method!&lt;BR /&gt;I look forward to your help.&lt;BR /&gt;thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2019 06:01:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Get-the-imx6-epit-clock-frequency/m-p/881123#M133559</guid>
      <dc:creator>864535720</dc:creator>
      <dc:date>2019-03-22T06:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get the imx6 epit clock frequency</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Get-the-imx6-epit-clock-frequency/m-p/881124#M133560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The EPIT module has 3 possible reference clock sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Peripheral IPG_CLK_ROOT clock (typical frequency is 66MHz).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Peripheral reference PERCLK_CLK_ROOT clock (typical frequency is also 66MHz but can be downscaled with additional 6-bit divider).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For details about the clocks above, please check the CCM clock tree diagram in the Chapter 18 "Clock Controller Module (CCM)" (Page 794) of the i.MX6Dual/Quad Reference Manual Rev.5 document, available on the processor's Documentation web page:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/i.mx-applications-processors/i.mx-6-processors/i.mx-6quad-processors-high-performance-3d-graphics-hd-video-arm-cortex-a9-core:i.MX6Q?tab=Documentation_Tab" target="test_blank"&gt;https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/i.mx-applications-processors/i.mx-6-processors/i.mx-6quad-processors-high-performance-3d-graphics-hd-video-arm-cortex-a9-core:i.MX6Q?tab=Documentation_Tab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. 32kHz clock source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the reference clock sources above can be selected by appropriately setting the EPITx_CR[CLKSRC] register field. For details, please refer to the Sections 24.6.1 "Control register (EPITx_CR)" and 24.5.1 "Change of Clock Source" of the document above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, there are the 12-bit clock prescaler and 32-bit counter register within the EPIT module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, to generate an interrupt every 1ms, you can, for example, select one of the 66MHz reference clock sources (see above), set the prescaler value to 66 (decimal) and counter value to 1000 (decimal).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Artur&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2019 11:59:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Get-the-imx6-epit-clock-frequency/m-p/881124#M133560</guid>
      <dc:creator>art</dc:creator>
      <dc:date>2019-03-29T11:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get the imx6 epit clock frequency</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Get-the-imx6-epit-clock-frequency/m-p/1237104#M170055</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/68383" target="_self"&gt;&lt;SPAN class=""&gt;864535720&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;I want to use GPT as system timer and EPIT as User timer, It is possible.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;If possible then please share me the below details about EPIT,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;1. How to enable the EPIT&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;2. How to use EPIT as a user timer&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;3. If you have any patch related to EPIT use as a usr timer please share with me.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-II lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Thanks in advance....&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 07:16:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Get-the-imx6-epit-clock-frequency/m-p/1237104#M170055</guid>
      <dc:creator>ravis5354</dc:creator>
      <dc:date>2021-02-26T07:16:16Z</dc:date>
    </item>
  </channel>
</rss>

