<?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: Using CMP to compare 2 analog inputs + capturing a FTM counter value in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Using-CMP-to-compare-2-analog-inputs-capturing-a-FTM-counter/m-p/1211846#M9600</link>
    <description>&lt;P&gt;Thanks for the reply&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jan 2021 16:09:09 GMT</pubDate>
    <dc:creator>riglesias</dc:creator>
    <dc:date>2021-01-14T16:09:09Z</dc:date>
    <item>
      <title>Using CMP to compare 2 analog inputs + capturing a FTM counter value</title>
      <link>https://community.nxp.com/t5/S32K/Using-CMP-to-compare-2-analog-inputs-capturing-a-FTM-counter/m-p/1207554#M9493</link>
      <description>&lt;P&gt;Hi, I want to configure the CMP to compare 2 analog inputs and capture a counter value depending on the comparator output, so i did the following:&lt;/P&gt;&lt;P&gt;1.On one hand, i know how to setup the CMP module and trigger an interrupt / put the result in&amp;nbsp;CMP0_OUT.&lt;/P&gt;&lt;P&gt;2. On the other hand, i know how to set the FTM module (counter) in single edge capture mode to capture the counter value given a configured input.&lt;/P&gt;&lt;P&gt;And now, I want to mix these two things together and capture the FTM counter value when the CMP0_OUT is set.&lt;/P&gt;&lt;P&gt;I know that i can se&lt;SPAN&gt;t&amp;nbsp;FTM&amp;nbsp;as&amp;nbsp;a&amp;nbsp;trigger&amp;nbsp;source&amp;nbsp;for&amp;nbsp;CMP0_OUT, using TRGMUX like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TRGMUX&lt;/SPAN&gt;&lt;SPAN&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;TRGMUXn&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;TRGMUX_FTM0_INDEX&lt;/SPAN&gt;&lt;SPAN&gt;]&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;TRGMUX_TRGMUXn_SEL0&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;0x0E&lt;/SPAN&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// 0x0E corresponds to CMP0_OUT&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but i dont know if i need to do something more, or if this is the correct path to follow to do what i need to do, so im posting this question in case somebody can give any tips on how to to this in a proper way.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks!!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 14:16:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Using-CMP-to-compare-2-analog-inputs-capturing-a-FTM-counter/m-p/1207554#M9493</guid>
      <dc:creator>riglesias</dc:creator>
      <dc:date>2021-01-06T14:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using CMP to compare 2 analog inputs + capturing a FTM counter value</title>
      <link>https://community.nxp.com/t5/S32K/Using-CMP-to-compare-2-analog-inputs-capturing-a-FTM-counter/m-p/1208873#M9527</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;If you want to capture the FTM CNT value on an active edge of the CMP0_OUT trigger signal, you can use SIM_FTMOPT1[FTM2CH0SEL, FTM1CH0SEL] to select CMP0_OUT instead of the FTM2_CH0 input, FTM1_CH0 input.&lt;BR /&gt;So, the CMP0_OUT signal will be the FTM IC input signal of the corresponding channel.&lt;BR /&gt;FTM0 does not support the feature though.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1610100433345.png" style="width: 598px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134322iB312AA26DFC37905/image-dimensions/598x187?v=v2" width="598" height="187" role="button" title="danielmartynek_0-1610100433345.png" alt="danielmartynek_0-1610100433345.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 10:08:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Using-CMP-to-compare-2-analog-inputs-capturing-a-FTM-counter/m-p/1208873#M9527</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2021-01-08T10:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using CMP to compare 2 analog inputs + capturing a FTM counter value</title>
      <link>https://community.nxp.com/t5/S32K/Using-CMP-to-compare-2-analog-inputs-capturing-a-FTM-counter/m-p/1211846#M9600</link>
      <description>&lt;P&gt;Thanks for the reply&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 16:09:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Using-CMP-to-compare-2-analog-inputs-capturing-a-FTM-counter/m-p/1211846#M9600</guid>
      <dc:creator>riglesias</dc:creator>
      <dc:date>2021-01-14T16:09:09Z</dc:date>
    </item>
  </channel>
</rss>

