<?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: Flex timer use with a Rotary Encoder in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448708#M26558</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not quite sure how you would get 1/2 your counts.&amp;nbsp; IF you had 'count/direction' mode for the QD(QUADMODE = 1,), I would expect only 1/4, as that only counts rising-edges on 'A', whereas the 'normal quadrature mode' will count ALL edges on both A and B.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2015 03:07:42 GMT</pubDate>
    <dc:creator>egoodii</dc:creator>
    <dc:date>2015-05-21T03:07:42Z</dc:date>
    <item>
      <title>Flex timer use with a Rotary Encoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448705#M26555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a customer who is using the K21 and wants to use the FlexTimer in the Quadrature Mode with an rotary encoder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;He wants to read the direction and count every 100 millisec and output the count to the 12bit Digital to Analog Converter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to read the FTM counter (reference manual pg 1061)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to directly output to the 12 bit DAC without DMA, and multiple buffers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 01:06:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448705#M26555</guid>
      <dc:creator>PHXFAE</dc:creator>
      <dc:date>2015-05-20T01:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Flex timer use with a Rotary Encoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448706#M26556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Certainly, the counter can be read at any time (as well as the status bit indicating the 'latest' direction).&amp;nbsp; But sure, SOME particular 'activity' will be necessary to read the counter and write it out to the DAC.&amp;nbsp; If not via 'system tick' code, then sure -- a triggered DMA can copy the count -- how is 'direction' to be represented in the DAC?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 22:38:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448706#M26556</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2015-05-20T22:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Flex timer use with a Rotary Encoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448707#M26557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alex, in my past experience with the FTM module and QD, you will need to be sure to disable FTM, then set your MOD value and then re-enable FTM.&amp;nbsp; If you don't do this, when you read the QD counter value, it will always be zero, and this will drive you nuts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fortunately, Earl is on this thread - he is the expert with Kinetis and QD as far as I can tell from earlier posts.&amp;nbsp; :smileyhappy:&amp;nbsp; Which reminds me, I might need to post up a question regarding my current issue where I believe I have the QD set up correctly, but I'm only getting 1/2 the number of encoder ticks per rotation...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 22:59:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448707#M26557</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-05-20T22:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Flex timer use with a Rotary Encoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448708#M26558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not quite sure how you would get 1/2 your counts.&amp;nbsp; IF you had 'count/direction' mode for the QD(QUADMODE = 1,), I would expect only 1/4, as that only counts rising-edges on 'A', whereas the 'normal quadrature mode' will count ALL edges on both A and B.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 03:07:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448708#M26558</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2015-05-21T03:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Flex timer use with a Rotary Encoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448709#M26559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Exactly&lt;/STRONG&gt;&lt;STRONG&gt;!&lt;/STRONG&gt;&amp;nbsp; There are only two settings, and 2x isn't one of them.&amp;nbsp; At first, I thought i was going crazy because the manufacturer's site says 2048 PPR, but I'm getting 4096, and there's no way to get double.&amp;nbsp; But then I hooked up the hardware to my motion control system and ran the encoder test there as a sanity check, and it came up with 8192.&amp;nbsp; So the mfg meant 2048 lines, not pulses.&amp;nbsp; But yeah, I'm getting 4096 instead of 8192, so I figure that I've got a mistake in my code somewhere, but not FTM settings related.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though it's interesting because I could have sworn that the pic33F I used recently supported 1x, 2x, and 4x quadrature decoding in it QEI module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your input!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 03:32:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448709#M26559</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-05-21T03:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Flex timer use with a Rotary Encoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448710#M26560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'2x' is certainly a 'valid' QEI mode for 'operations in general' -- use one channel for 'direction', BUT count BOTH edges of the 'other channel' (falling while low or rising while high being 'one direction', the other conditions the other direction).&amp;nbsp; I have certainly found this mode 'necessary', for instance, for some 'knob encoders' where the detents were directly ON the edges of one of the channels, and so 'unusable' as a counting edge.&amp;nbsp; Now, that all being said, I am not aware either of any such '2x' decode mode for the Kinetis QD module.&amp;nbsp; I can also not imagine how else your 'test system' would find 8192 counts other than 'every edge of 2048 lines' -- and thus I am also stumped as to why Kinetis fails to get the same results.&amp;nbsp; I guess I would want to see a scope-shot of a 'few cycles' from a SHORT move, and count-register-reads before and after, to have something to look at...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 04:18:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448710#M26560</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2015-05-21T04:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Flex timer use with a Rotary Encoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448711#M26561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Earl.&amp;nbsp; I agree with everything you're saying.&amp;nbsp; I don't want to hijack his thread, so I'll create a new post later this week and will mention you so you know I'm calling.&amp;nbsp; :smileywink:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 04:36:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448711#M26561</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-05-21T04:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Flex timer use with a Rotary Encoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448712#M26562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just one more quick question while you're here(!):&amp;nbsp; What do you get if you FORCE 'count/direction' mode QD(QUADMODE = 1,):&amp;nbsp; I should HOPE the 2048 pulses-per-revolution-of-one-phase?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 05:29:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448712#M26562</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2015-05-21T05:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Flex timer use with a Rotary Encoder</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448713#M26563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From what I can recall, I got 1024, which is why when I fixed the count mode and got 4096 I thought I was good to go.&amp;nbsp; But this was a while back and now I can't remember for sure.&amp;nbsp; I'm quite positive that it's something I messed up with MOD and handling of the overflow interrupt, but I just need to dig into it.&amp;nbsp; Unfortunately, right now I'm busy trying to figure out why the working lwIP app I have upgraded from KSDK 1.1 to KSDK 1.2 no longer works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 05:48:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flex-timer-use-with-a-Rotary-Encoder/m-p/448713#M26563</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-05-21T05:48:33Z</dc:date>
    </item>
  </channel>
</rss>

