<?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: loading an instant value to ftm.CNT counter value while counting in quadrature decoder mode in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/loading-an-instant-value-to-ftm-CNT-counter-value-while-counting/m-p/978786#M55422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I made a demo to test how to update CNTIN and CNT. It use PTC1 and PTC2 to simulate quadrature input. You can see that any writing to CNT will make&amp;nbsp; it reload CNTIN value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Nov 2019 06:29:50 GMT</pubDate>
    <dc:creator>jingpan</dc:creator>
    <dc:date>2019-11-21T06:29:50Z</dc:date>
    <item>
      <title>loading an instant value to ftm.CNT counter value while counting in quadrature decoder mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/loading-an-instant-value-to-ftm-CNT-counter-value-while-counting/m-p/978783#M55419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using FTM2 on MKV10z32 as quadrateure decoder . and some times while running I&amp;nbsp;&amp;nbsp;re-synchronize the counter with a specific value and continue counting in the quadrature decoding mode from 0x0000 to 0xffff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the next code to load the instant value(x) . but it seems that it dosnt work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM2-&amp;gt;SC=0x00; &lt;BR /&gt;FTM2-&amp;gt;MOD=0xFFFF;&lt;BR /&gt;FTM2-&amp;gt;CNTIN=x;&lt;BR /&gt;FTM2-&amp;gt;CONTROLS[0].CnSC=0;&lt;BR /&gt;FTM2-&amp;gt;CONTROLS[1].CnSC=0;&lt;BR /&gt;FTM2-&amp;gt;QDCTRL|=0x01;&lt;BR /&gt;FTM2-&amp;gt;MODE|=0x05;&lt;BR /&gt;FTM2-&amp;gt;SC=0x48; &lt;BR /&gt;FTM2-&amp;gt;CNTIN=0;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2019 10:15:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/loading-an-instant-value-to-ftm-CNT-counter-value-while-counting/m-p/978783#M55419</guid>
      <dc:creator>amerzater</dc:creator>
      <dc:date>2019-10-29T10:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: loading an instant value to ftm.CNT counter value while counting in quadrature decoder mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/loading-an-instant-value-to-ftm-CNT-counter-value-while-counting/m-p/978784#M55420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;You code seems same as AN5142 quadrature encode example. Do you mean at first it can work correctly, but you can't write new value to FTM2-&amp;gt;MOD or FTM2-&amp;gt;CNTIN?&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;A _jive_internal="true" class="" href="https://community.nxp.com/message/323855?commentID=323855#comment-323855" title="https://community.nxp.com/message/323855?commentID=323855#comment-323855"&gt;https://community.nxp.com/message/323855&lt;/A&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/304806"&gt;QEI inputs, and index capture&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2019 02:35:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/loading-an-instant-value-to-ftm-CNT-counter-value-while-counting/m-p/978784#M55420</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2019-11-05T02:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: loading an instant value to ftm.CNT counter value while counting in quadrature decoder mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/loading-an-instant-value-to-ftm-CNT-counter-value-while-counting/m-p/978785#M55421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the quadrature encoder works just fine after the first&amp;nbsp;init. but when I need to load a new value to FTm-&amp;gt;CNT during running. I do the next to load the new value by means of CNTIN&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;stop ftm clock&lt;/LI&gt;&lt;LI&gt;load new data&amp;nbsp; to CNTIN and CNT regs&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;run ftm clock&lt;/LI&gt;&lt;LI&gt;reset CNTIN to allow counting from 0x0000 to FFFF&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;but it didnt work !!.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2019 11:41:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/loading-an-instant-value-to-ftm-CNT-counter-value-while-counting/m-p/978785#M55421</guid>
      <dc:creator>amerzater</dc:creator>
      <dc:date>2019-11-18T11:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: loading an instant value to ftm.CNT counter value while counting in quadrature decoder mode</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/loading-an-instant-value-to-ftm-CNT-counter-value-while-counting/m-p/978786#M55422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I made a demo to test how to update CNTIN and CNT. It use PTC1 and PTC2 to simulate quadrature input. You can see that any writing to CNT will make&amp;nbsp; it reload CNTIN value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 06:29:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/loading-an-instant-value-to-ftm-CNT-counter-value-while-counting/m-p/978786#M55422</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2019-11-21T06:29:50Z</dc:date>
    </item>
  </channel>
</rss>

