<?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: How to find out what clock is used for timer in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1358803#M181838</link>
    <description>&lt;P&gt;Let me try to rephrase the question:&lt;/P&gt;&lt;P&gt;I'm setting up a timer using the following commands:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LPTMR_GetDefaultConfig(&amp;amp;lptmrConfig);
lptmrConfig.prescalerClockSource = kLPTMR_PrescalerClock_0;&lt;/LI-CODE&gt;&lt;P&gt;Now I want to get the frequency to generate an interrupt that is called every 1 ms. I plan to use the following command:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LPTMR_SetTimerPeriod(LPTMR0, USEC_TO_COUNT(1000U, CLOCK_GetFreq(XXX)));&lt;/LI-CODE&gt;&lt;P&gt;What should I be replacing XXX with to get the desired performance for the clock I selected above?&lt;/P&gt;</description>
    <pubDate>Wed, 20 Oct 2021 16:32:52 GMT</pubDate>
    <dc:creator>qingg</dc:creator>
    <dc:date>2021-10-20T16:32:52Z</dc:date>
    <item>
      <title>How to find out what clock is used for timer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1353725#M181367</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on a project using example trgmux_lptmr_trigger_lpit as a starting point. I have a question about how I know what timer is set in the code. Specifically, in this example, the following code exists:&lt;/P&gt;&lt;P&gt;/* Get source clock for LPTMR driver */&lt;BR /&gt;#define LPTMR_SOURCE_CLOCK CLOCK_GetFreq(kCLOCK_LpoClk)&lt;BR /&gt;/* Define LPTMR microseconds counts value */&lt;BR /&gt;#define LPTMR_USEC_COUNT 500000U&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;* Set timer period.&lt;BR /&gt;* Note : the parameter "ticks" of LPTMR_SetTimerPeriod should be equal or greater than 1.&lt;BR /&gt;*/&lt;BR /&gt;LPTMR_SetTimerPeriod(LPTMR0, USEC_TO_COUNT(LPTMR_USEC_COUNT, LPTMR_SOURCE_CLOCK));&lt;/P&gt;&lt;P&gt;How do I know&amp;nbsp;kCLOCK_LpoClk is the clock I should pick for the macro but not any other clock? I assumes this means&amp;nbsp;kCLOCK_LpoClk is set by the code somewhere but I couldn't find where.&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Qing&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 20:49:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1353725#M181367</guid>
      <dc:creator>qingg</dc:creator>
      <dc:date>2021-10-11T20:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out what clock is used for timer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1353750#M181369</link>
      <description>&lt;P&gt;Hi Qing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for clock sources for various modules one can look at Chapter 24 Clocking&lt;/P&gt;
&lt;P&gt;&lt;A id="relatedDocsClick_2" href="https://www.nxp.com/webapp/Download?colCode=IMX7ULPRMB2" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;i.MX7ULPRMB2: i.MX 7ULP Applications Processor Reference Manual for Silicon Revision B2&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and in SDK files ../drivers/fsl_clock.h, fsl_clock.c&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 23:35:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1353750#M181369</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-10-11T23:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out what clock is used for timer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1358803#M181838</link>
      <description>&lt;P&gt;Let me try to rephrase the question:&lt;/P&gt;&lt;P&gt;I'm setting up a timer using the following commands:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LPTMR_GetDefaultConfig(&amp;amp;lptmrConfig);
lptmrConfig.prescalerClockSource = kLPTMR_PrescalerClock_0;&lt;/LI-CODE&gt;&lt;P&gt;Now I want to get the frequency to generate an interrupt that is called every 1 ms. I plan to use the following command:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LPTMR_SetTimerPeriod(LPTMR0, USEC_TO_COUNT(1000U, CLOCK_GetFreq(XXX)));&lt;/LI-CODE&gt;&lt;P&gt;What should I be replacing XXX with to get the desired performance for the clock I selected above?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 16:32:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1358803#M181838</guid>
      <dc:creator>qingg</dc:creator>
      <dc:date>2021-10-20T16:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out what clock is used for timer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1359861#M181939</link>
      <description>&lt;P&gt;from team:&lt;/P&gt;
&lt;P&gt;-----------------------------&lt;/P&gt;
&lt;P&gt;kCLOCK_LpoClk is defined in fsl_clock.h file.&lt;/P&gt;
&lt;P&gt;There are 4 optional clock sources for LPTMR as following (from 7ULP reference manual):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lptmr-clk.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/159842i5F7ACFB2F5CE4A05/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lptmr-clk.png" alt="lptmr-clk.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;You can choose one of the clock source here and then find the related clock name from&amp;nbsp;clock_name_t struct in fsl_clock.h file.&lt;/P&gt;
&lt;P&gt;Besides, you may need a 7ULP reference manual doc for more details:&lt;/P&gt;
&lt;P&gt;&lt;A id="relatedDocsClick_2" href="https://www.nxp.com/webapp/Download?colCode=IMX7ULPRMB2" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;i.MX7ULPRMB2: i.MX 7ULP Applications Processor Reference Manual for Silicon Revision B2&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;----------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 09:47:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1359861#M181939</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-10-22T09:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to find out what clock is used for timer</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1366831#M182644</link>
      <description>&lt;P&gt;OK. Based on your explanations, I determined the answer is kCLOCK_ScgSircClk for the XXX in my code. In other words:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LPTMR_SetTimerPeriod(LPTMR0, USEC_TO_COUNT(1000U, CLOCK_GetFreq(kCLOCK_ScgSircClk)));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Qing&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 16:04:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-find-out-what-clock-is-used-for-timer/m-p/1366831#M182644</guid>
      <dc:creator>qingg</dc:creator>
      <dc:date>2021-11-04T16:04:05Z</dc:date>
    </item>
  </channel>
</rss>

