<?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 FTM_CNT value changing in quadrature encoder mode without any movement at the encoder end. Can somebody help intialize FTM in quadrature encoder mode with output compare match? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/FTM-CNT-value-changing-in-quadrature-encoder-mode-without-any/m-p/817618#M125976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently using colibri imx 7 som. I am trying to initialize the quadrature encoder mode with ouput compare match. The code given below the intialization of registers as per the instructions given in the manual. I do see change in the FTM count register even though the enoder is not moving. Are there any other changes I need to make to the FTM registers or any other registers in conjuntion to make the code functional&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//initialization is mentioned on pg 4197&lt;BR /&gt; &lt;BR /&gt;FTM_FMS=0x00000000; //6 WPEN 0 Write Protection Enable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_MODE |=(1&amp;lt;&amp;lt;FTMEN);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_SC &amp;amp;= ~((1&amp;lt;&amp;lt;CLKS_0)|(1&amp;lt;&amp;lt;CLKS_1));&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_CONF |=(1&amp;lt;&amp;lt;BDMMODE_1)|(1&amp;lt;&amp;lt;BDMMODE_0);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_POL=0x00000003;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_OUTMASK =0x0000007A;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_QDCTRL &amp;amp;= ~((1&amp;lt;&amp;lt;QUADMODE)|(1&amp;lt;&amp;lt;QUADEN));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_CNTIN=0x00000000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_C7SC=0x0000001C;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_COMBINE=0x00000000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_C7V=0x00006000;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_DEADTIME=0x00000000;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_FILTER=0x00000044; &lt;BR /&gt; &lt;BR /&gt;// FTM_INVCTRL=0x00000000; //not used&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; //FTM_SWOCTRL=0x00000000;&amp;nbsp;&lt;SPAN&gt;//not used&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// FTM_OUTINIT=0x00000000;&amp;nbsp;&lt;SPAN&gt;//not used&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_SC |=(1&amp;lt;&amp;lt;CLKS_0);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_QDCTRL |=(1&amp;lt;&amp;lt;PHBFLTREN)|(1&amp;lt;&amp;lt;PHAFLTREN)|(1&amp;lt;&amp;lt;QUADEN);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_MODE &amp;amp;=~(1&amp;lt;&amp;lt;FTMEN);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_SYNCONF |= (1&amp;lt;&amp;lt;SYNCMODE)|(1&amp;lt;&amp;lt;SWRSTCNT)|(1&amp;lt;&amp;lt;SWWRBUF)|(1&amp;lt;&amp;lt;SWOM);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_SYNC |= (1&amp;lt;&amp;lt;SWSYNC) |(1&amp;lt;&amp;lt;CNTMAX)|(1&amp;lt;&amp;lt;SYNCHOM) ; &lt;BR /&gt; &lt;BR /&gt;FTM_CNT=0x00000000; //0-15 COUNT 0x000 Counter Value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Aug 2018 04:30:44 GMT</pubDate>
    <dc:creator>tan_k</dc:creator>
    <dc:date>2018-08-23T04:30:44Z</dc:date>
    <item>
      <title>FTM_CNT value changing in quadrature encoder mode without any movement at the encoder end. Can somebody help intialize FTM in quadrature encoder mode with output compare match?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/FTM-CNT-value-changing-in-quadrature-encoder-mode-without-any/m-p/817618#M125976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently using colibri imx 7 som. I am trying to initialize the quadrature encoder mode with ouput compare match. The code given below the intialization of registers as per the instructions given in the manual. I do see change in the FTM count register even though the enoder is not moving. Are there any other changes I need to make to the FTM registers or any other registers in conjuntion to make the code functional&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//initialization is mentioned on pg 4197&lt;BR /&gt; &lt;BR /&gt;FTM_FMS=0x00000000; //6 WPEN 0 Write Protection Enable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_MODE |=(1&amp;lt;&amp;lt;FTMEN);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_SC &amp;amp;= ~((1&amp;lt;&amp;lt;CLKS_0)|(1&amp;lt;&amp;lt;CLKS_1));&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_CONF |=(1&amp;lt;&amp;lt;BDMMODE_1)|(1&amp;lt;&amp;lt;BDMMODE_0);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_POL=0x00000003;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_OUTMASK =0x0000007A;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_QDCTRL &amp;amp;= ~((1&amp;lt;&amp;lt;QUADMODE)|(1&amp;lt;&amp;lt;QUADEN));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_CNTIN=0x00000000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_C7SC=0x0000001C;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_COMBINE=0x00000000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_C7V=0x00006000;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_DEADTIME=0x00000000;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_FILTER=0x00000044; &lt;BR /&gt; &lt;BR /&gt;// FTM_INVCTRL=0x00000000; //not used&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; //FTM_SWOCTRL=0x00000000;&amp;nbsp;&lt;SPAN&gt;//not used&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// FTM_OUTINIT=0x00000000;&amp;nbsp;&lt;SPAN&gt;//not used&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_SC |=(1&amp;lt;&amp;lt;CLKS_0);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FTM_QDCTRL |=(1&amp;lt;&amp;lt;PHBFLTREN)|(1&amp;lt;&amp;lt;PHAFLTREN)|(1&amp;lt;&amp;lt;QUADEN);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_MODE &amp;amp;=~(1&amp;lt;&amp;lt;FTMEN);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_SYNCONF |= (1&amp;lt;&amp;lt;SYNCMODE)|(1&amp;lt;&amp;lt;SWRSTCNT)|(1&amp;lt;&amp;lt;SWWRBUF)|(1&amp;lt;&amp;lt;SWOM);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FTM_SYNC |= (1&amp;lt;&amp;lt;SWSYNC) |(1&amp;lt;&amp;lt;CNTMAX)|(1&amp;lt;&amp;lt;SYNCHOM) ; &lt;BR /&gt; &lt;BR /&gt;FTM_CNT=0x00000000; //0-15 COUNT 0x000 Counter Value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 04:30:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/FTM-CNT-value-changing-in-quadrature-encoder-mode-without-any/m-p/817618#M125976</guid>
      <dc:creator>tan_k</dc:creator>
      <dc:date>2018-08-23T04:30:44Z</dc:date>
    </item>
  </channel>
</rss>

