<?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>Kinetis MicrocontrollersのトピックRe: Need to count 32-bit value using LPT(low power timer)</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385256#M20719</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi martin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I dint get your answer exactly. After i set prescaler, how to count? can you briefly tell us; it will be helpuful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Feb 2015 03:32:50 GMT</pubDate>
    <dc:creator>sujaigowda</dc:creator>
    <dc:date>2015-02-27T03:32:50Z</dc:date>
    <item>
      <title>Need to count 32-bit value using LPT(low power timer)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385251#M20714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, I'm using Kinetis controller and ihave a question for lpt(low power timer). I'm using LPT as counter(counter and compare registers are 16-bit wide) and i need to count 32 bit value instead of 16 bit. can i cascaded the LPT?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 08:16:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385251#M20714</guid>
      <dc:creator>sujaigowda</dc:creator>
      <dc:date>2015-02-19T08:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need to count 32-bit value using LPT(low power timer)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385252#M20715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sujai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible. You can configure both timers, start one timer at any moment and then start the second timer inside the interrupts of the first timer. E.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; init_LPTMR0 ();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; init_LPTMR1 ();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPTMR0_CSR |= LPTMR_CSR_TEN_MASK;&amp;nbsp;&amp;nbsp; //Turn on LPT and start counting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void LPTimer0_IRQHandler(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPTMR1_CSR |= LPTMR_CSR_TEN_MASK;&amp;nbsp;&amp;nbsp; //Turn on LPT and start counting&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Technical Support Engineer&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 23:42:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385252#M20715</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2015-02-23T23:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need to count 32-bit value using LPT(low power timer)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385253#M20716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you for your reply. Yeah i was using same method in a different approach. i was trying to cascade it in hardware. Now im using same method and is working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you carlos.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 04:48:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385253#M20716</guid>
      <dc:creator>sujaigowda</dc:creator>
      <dc:date>2015-02-26T04:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need to count 32-bit value using LPT(low power timer)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385254#M20717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sujai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am glad your problem was solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you find our responses useful I encourage you to mark them as helpful or correct answer. This will help other members find the best answers as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Technical Support Engineer&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 17:31:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385254#M20717</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2015-02-26T17:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need to count 32-bit value using LPT(low power timer)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385255#M20718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or, If you have only one LPTMR avaliable, you can set prescaler to 65536, count the upper 16 bits and then disable prescaler and count the lower 16 bits.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2015 19:36:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385255#M20718</guid>
      <dc:creator>bendis</dc:creator>
      <dc:date>2015-02-26T19:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need to count 32-bit value using LPT(low power timer)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385256#M20719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi martin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I dint get your answer exactly. After i set prescaler, how to count? can you briefly tell us; it will be helpuful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 03:32:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385256#M20719</guid>
      <dc:creator>sujaigowda</dc:creator>
      <dc:date>2015-02-27T03:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need to count 32-bit value using LPT(low power timer)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385257#M20720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say you have &lt;EM&gt;uint32_t count&lt;/EM&gt; value. What you need to do is to split counting in two steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;First, you set prescaler in the PSR register to divide by 65536 and prescaler bypass PBYP to 0. Then you set the compare register CMR to &lt;EM&gt;(count &amp;gt;&amp;gt; 16)&lt;/EM&gt; and start the timer.&lt;/LI&gt;&lt;LI&gt;Second, when you get the timer interrupt, you disable prescaler by setting PBYP to 1 and set the compare register CMR to &lt;EM&gt;(count &amp;amp; 0xFFFF)&lt;/EM&gt; and again start the timer and wait for the interrupt.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first step you configure LPTMR to run 65536 times slower to count &lt;EM&gt;(count &amp;amp; 0xFFFF0000)&lt;/EM&gt; clock cycles. Then you disable prescaler to count the remaining time - the lower 16 bits of your count value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 07:24:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385257#M20720</guid>
      <dc:creator>bendis</dc:creator>
      <dc:date>2015-02-27T07:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need to count 32-bit value using LPT(low power timer)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385258#M20721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you martin. its a helpful answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 10:41:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Need-to-count-32-bit-value-using-LPT-low-power-timer/m-p/385258#M20721</guid>
      <dc:creator>sujaigowda</dc:creator>
      <dc:date>2015-02-27T10:41:30Z</dc:date>
    </item>
  </channel>
</rss>

