<?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: K22 FTM Quadrature Decoder in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606818#M35791</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Kent, &lt;/P&gt;&lt;P&gt;As the other engineers said that the K22 has three FTM modules FTM0/FTM1/FTM2, the FTM0 has 8 channles, and is used to generate PWM signhal to control motor, only the FTM1 and FTM has the decodering function. The FTM1 decoding pin are FTM1_QD_PHA/FTM1_QD_PHB, the FTM2 decodering pins are FTM2_QD_PHA/FTM2_QD_PHB, The RM has&amp;nbsp; the pin assiognment as Kiss said.&lt;/P&gt;&lt;P&gt;I suggest you refer to an5142, which has the code for decodering.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1" title="http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1"&gt;http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it can help you.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Sep 2016 04:00:25 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2016-09-13T04:00:25Z</dc:date>
    <item>
      <title>K22 FTM Quadrature Decoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606815#M35788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Now I use&amp;nbsp;&lt;STRONG&gt;MK22FN1M0AVLH12&lt;/STRONG&gt; 64pin chip, on page 997 of K22 Sub-Family Reference Manual, Rev. 5, March 15, it mentioned that&amp;nbsp;&lt;STRONG&gt;FTM Quadrature Decoder&lt;/STRONG&gt;, but I can't find the which pin of&amp;nbsp;&lt;SPAN&gt;MK22FN1M0AVLH12 connect to Phase A, Phase B. If possible, could you please&lt;STRONG&gt; show me Phase A and Phase B pins number and demo SW&lt;/STRONG&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kent&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 07:56:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606815#M35788</guid>
      <dc:creator>kent_gu</dc:creator>
      <dc:date>2016-09-12T07:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: K22 FTM Quadrature Decoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606816#M35789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kent,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use either the Ref Manual or the Datasheet to check it. DS, you can try &lt;A class="link-titled" href="http://www.nxp.com/files/32bit/doc/ref_manual/K22P64M120SF5V2RM.pdf?fasp=1&amp;amp;WT_TYPE=Reference%20Manuals&amp;amp;WT_VENDOR=FREESCALE&amp;amp;WT_FILE_FORMAT=pdf&amp;amp;WT_ASSET=Documentation&amp;amp;fileExt=.pdf" title="http://www.nxp.com/files/32bit/doc/ref_manual/K22P64M120SF5V2RM.pdf?fasp=1&amp;amp;WT_TYPE=Reference%20Manuals&amp;amp;WT_VENDOR=FREESCALE&amp;amp;WT_FILE_FORMAT=pdf&amp;amp;WT_ASSET=Documentation&amp;amp;fileExt=.pdf"&gt;http://www.nxp.com/files/32bit/doc/ref_manual/K22P64M120SF5V2RM.pdf?fasp=1&amp;amp;WT_TYPE=Reference%20Manuals&amp;amp;WT_VENDOR=FREESCA…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In RM, in Chapter 10.3, you can see a table for pin vs functions. For Quadrature, it depends on which FTM you intend to use. For example, for FTM1, pins 28 and 29 can be set for Quadrature function using the ALT7 (pin function alternative 7) or pins 35 and 36 using ALT6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For selecting Pins you can use in the Kinetis Expert SW Website the Pins Tool - &lt;A class="link-titled" href="https://kex.nxp.com/en/pins" title="https://kex.nxp.com/en/pins"&gt;https://kex.nxp.com/en/pins&lt;/A&gt;. There you can check all the possibilities for Quadrature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Renato Kiss&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:54:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606816#M35789</guid>
      <dc:creator>renato_kiss</dc:creator>
      <dc:date>2016-09-12T13:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: K22 FTM Quadrature Decoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606817#M35790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As for demo, you might get some info with the code &amp;amp; comments I have posted here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/304806"&gt;https://community.nxp.com/thread/304806&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 18:13:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606817#M35790</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-09-12T18:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: K22 FTM Quadrature Decoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606818#M35791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Kent, &lt;/P&gt;&lt;P&gt;As the other engineers said that the K22 has three FTM modules FTM0/FTM1/FTM2, the FTM0 has 8 channles, and is used to generate PWM signhal to control motor, only the FTM1 and FTM has the decodering function. The FTM1 decoding pin are FTM1_QD_PHA/FTM1_QD_PHB, the FTM2 decodering pins are FTM2_QD_PHA/FTM2_QD_PHB, The RM has&amp;nbsp; the pin assiognment as Kiss said.&lt;/P&gt;&lt;P&gt;I suggest you refer to an5142, which has the code for decodering.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1" title="http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1"&gt;http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it can help you.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 04:00:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606818#M35791</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-09-13T04:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: K22 FTM Quadrature Decoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606819#M35792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Xiangjun,&lt;/P&gt;&lt;P&gt;Thank you a lot for your reply, it is helpful. Yes, I saw the demo code in the page 18 of an5142, there is quadratureDecoder intial and period interrupt. Now I want to pop up the counter value when encoder PHA &amp;amp; PHB happen, so I &lt;STRONG&gt;want to use the processor express to realize the code. But I don't know how to setting?&lt;span class="lia-inline-image-display-wrapper" image-alt="FTM_QD.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5094iF8FBFDF0A608433F/image-size/large?v=v2&amp;amp;px=999" role="button" title="FTM_QD.jpg" alt="FTM_QD.jpg" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Could you please give me some advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below site, which&amp;nbsp;have some setting about it, but it lost some picture or infromation.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/350276"&gt;https://community.nxp.com/thread/350276&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Kent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 05:22:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606819#M35792</guid>
      <dc:creator>kent_gu</dc:creator>
      <dc:date>2016-09-13T05:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: K22 FTM Quadrature Decoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606820#M35793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;Anyone have any input about, "&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;want to pop up the counter value when encoder PHA &amp;amp; PHB dual edge"? It means that at &amp;nbsp;the dual edge of PHA &amp;amp; PHB trigger interrupt, and enter ISR?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Kent&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 23:08:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606820#M35793</guid>
      <dc:creator>kent_gu</dc:creator>
      <dc:date>2016-10-18T23:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: K22 FTM Quadrature Decoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606821#M35794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Kent,&lt;/P&gt;&lt;P&gt;where do you want to pop up the FTM counter? I think you can use Freemaster tools to display the FTM counter, in the case, you can read the FTM counter to a variable in the main loop so that Freemaster tools can display the variable. As an alternative, you can use PIT to generate an interrupt, in the ISR of PIT, read FTM counter to a variable so that the Freemaster tools can display it.&lt;/P&gt;&lt;P&gt;If you use UART module to transfer the FTM counter, you can read the FTM counter in the ISR of UART.&lt;/P&gt;&lt;P&gt;Hope it can help you.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 03:38:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606821#M35794</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-10-19T03:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: K22 FTM Quadrature Decoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606822#M35795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;XiaoJun,&lt;/P&gt;&lt;P&gt;Thanks a lot for your reply, also thanks a lot for your Freemaster tool&amp;nbsp;recommendation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I want to use&amp;nbsp;"FTM2 Quadrature Decoder" to sample&amp;nbsp;FTM2_QD_PHA and&amp;nbsp;FTM2_QD_PHB signals, and read the FTM counter, it is for motor speed detection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Any KSDK2.0 example for "Quadrature decoder mode" using FTM?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Kent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 07:49:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606822#M35795</guid>
      <dc:creator>kent_gu</dc:creator>
      <dc:date>2016-10-19T07:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: K22 FTM Quadrature Decoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606823#M35796</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 do not think that the SDK2.0 has example for quadrature module, but I think SDK2.0 provides the corresponding api function.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 08:54:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-FTM-Quadrature-Decoder/m-p/606823#M35796</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-10-26T08:54:34Z</dc:date>
    </item>
  </channel>
</rss>

