<?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: Loose quadrature encoder count in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551573#M5648</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;Regarding your question, can you check if the FTM_CNT is updated or not when the motor spin fast in debugger?&amp;nbsp; If the FTM_CNT is updated, it is okay from hardware perspective. Pls disable the "Phase A Input Filter Enable" and "Phase B Input Filter Enable" feature by clearing the PHAFLTREN/PHBFLTREN bits in FTMx_QDCTRL register.&lt;/P&gt;&lt;P&gt;Can you tell me the mechanical speed and the encoder pulse number per revolution so that I can compute the FTM counting frequency? it seems that the FTM counting frequency should be less than core frequency/4.&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, 21 Jun 2016 06:20:22 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2016-06-21T06:20:22Z</dc:date>
    <item>
      <title>Loose quadrature encoder count</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551572#M5647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, &lt;/P&gt;&lt;P&gt;I am using MK20DX256VLL10 to read quadrature encoder.&lt;/P&gt;&lt;P&gt;The IDE and library i used for it is KDS3.0+KSDK1.3+PE.&lt;/P&gt;&lt;P&gt;The encoder resolution is 8192 ticks/revolution. &lt;/P&gt;&lt;P&gt;The maximum ticks the chip can return is unsigned 16 bits which is 65535.&lt;/P&gt;&lt;P&gt;The code updated the counter fine until I run the encoder in 1.2 m/s. &lt;/P&gt;&lt;P&gt;The encoder counter stop updating until I slow it down.&lt;/P&gt;&lt;P&gt;I probe the encoder with oscilloscope and the encoder can still send out signal not matter how fast i &lt;/P&gt;&lt;P&gt;turn. &lt;/P&gt;&lt;P&gt;The counter read from the functions stop updating around 2.8KHz. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering what could be possible causes for this?&lt;/P&gt;&lt;P&gt;Is it because I run encoder too fast so the code doesnt have time to react?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will be really appreciated that if someone can answer this question.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 19:10:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551572#M5647</guid>
      <dc:creator>yarannan</dc:creator>
      <dc:date>2016-06-20T19:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Loose quadrature encoder count</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551573#M5648</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;Regarding your question, can you check if the FTM_CNT is updated or not when the motor spin fast in debugger?&amp;nbsp; If the FTM_CNT is updated, it is okay from hardware perspective. Pls disable the "Phase A Input Filter Enable" and "Phase B Input Filter Enable" feature by clearing the PHAFLTREN/PHBFLTREN bits in FTMx_QDCTRL register.&lt;/P&gt;&lt;P&gt;Can you tell me the mechanical speed and the encoder pulse number per revolution so that I can compute the FTM counting frequency? it seems that the FTM counting frequency should be less than core frequency/4.&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, 21 Jun 2016 06:20:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551573#M5648</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-06-21T06:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loose quadrature encoder count</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551574#M5649</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;I was thinking it is because the encoder is too fast and always enter the interrupt and couldn't update the new number. &lt;/P&gt;&lt;P&gt;So i assumed that even i enter into debugger mode, since it is slower than normal running mode, and the FTM_CNT &lt;/P&gt;&lt;P&gt;would still be updated. I could give a try to see what happen. Please see datasheet of the encoder we used. It is 8192 ticks/revolution. &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.usdigital.com/products/encoders/incremental/rotary/kit/E6" title="http://www.usdigital.com/products/encoders/incremental/rotary/kit/E6"&gt;US Digital | Products » E6 Optical Kit Encoder&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2016 12:18:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551574#M5649</guid>
      <dc:creator>yarannan</dc:creator>
      <dc:date>2016-06-21T12:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Loose quadrature encoder count</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551575#M5650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And the mechanical speed is around 3000rpm.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2016 15:24:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551575#M5650</guid>
      <dc:creator>yarannan</dc:creator>
      <dc:date>2016-06-21T15:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Loose quadrature encoder count</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551576#M5651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Yaran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the interrupt issue, do you connect one of PhaseA or PhaseB to FTM_CHx&amp;nbsp; of another FTM module so that you can get precious speed in slow speed? If it is the case, the interrtupt triggering frequency will be about 3K*8.192K/(4*60)=100KHz, of course, the cpu is overloaded. At the time being, pls disable the capture interrupt.&lt;/P&gt;&lt;P&gt;If you use it to control BLDC, the tick number you need to generate interrupt to switch stator is 8192/(6*polar pair), assume that the polar pair of BLDC is 1, it is 1365, the interrupt frequency is 6*(3000/60)=300HZ, I think it is okay.&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, 22 Jun 2016 02:39:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Loose-quadrature-encoder-count/m-p/551576#M5651</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-06-22T02:39:39Z</dc:date>
    </item>
  </channel>
</rss>

