<?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 ADC trigger via FTM channels Rising edge or Falling edge in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-trigger-via-FTM-channels-Rising-edge-or-Falling-edge/m-p/804698#M48907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;SPAN style="color: #333333; background-color: #f5f5f5;"&gt;Now I have a problem that I can't solve.&lt;SPAN style="background-color: #f5f5f5;"&gt;I want to use the FTM channel pin to trigger the ADC acquisition, such as FTM0-&amp;gt; CH0,&lt;SPAN&gt;FTM1-&amp;gt; CH0 or&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;FTM0-&amp;gt; CH0,If the &lt;SPAN style="background-color: #f5f5f5;"&gt;channels&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;have a Rising edge or Falling edge,it can trigger ADC,if channels have no edge,it do not trigger ADC；but now&amp;nbsp;if&amp;nbsp;I add &lt;SPAN style="background-color: #ffffff;"&gt;FTM1-&amp;gt;EXTTRIG |=&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;FTM_EXTTRIG_INITTRIGEN_MASK&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;;It will trigger automatically and do not stop;I want to know if the FTM channel can trigger ADC like that?&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 0cm; background: white;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #51626f;"&gt;Here's FTM1 initialization.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 0cm; background: white;"&gt;&lt;/P&gt;&lt;P style="margin-left: 0cm; background: white;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #51626f;"&gt;SIM-&amp;gt;SCGC6 |= SIM_SCGC6_FTM1_MASK;&lt;BR /&gt; FTM1-&amp;gt;MOD = period -1;&lt;BR /&gt; FTM1-&amp;gt;CNTIN =0;&lt;BR /&gt; FTM1-&amp;gt;CNT =0;&lt;BR /&gt; FTM1-&amp;gt;SC= FTM_SC_CLKS(1)|FTM_SC_PS(7);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 0cm; background: white;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #51626f;"&gt;//FTM1-&amp;gt;EXTTRIG |=FTM_EXTTRIG_CH1TRIG_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 0cm; background: white;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #51626f;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;FTM1-&amp;gt;EXTTRIG |=&lt;/SPAN&gt;FTM_EXTTRIG_INITTRIGEN_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Dec 2018 05:16:50 GMT</pubDate>
    <dc:creator>529533342</dc:creator>
    <dc:date>2018-12-17T05:16:50Z</dc:date>
    <item>
      <title>ADC trigger via FTM channels Rising edge or Falling edge</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-trigger-via-FTM-channels-Rising-edge-or-Falling-edge/m-p/804698#M48907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;SPAN style="color: #333333; background-color: #f5f5f5;"&gt;Now I have a problem that I can't solve.&lt;SPAN style="background-color: #f5f5f5;"&gt;I want to use the FTM channel pin to trigger the ADC acquisition, such as FTM0-&amp;gt; CH0,&lt;SPAN&gt;FTM1-&amp;gt; CH0 or&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;FTM0-&amp;gt; CH0,If the &lt;SPAN style="background-color: #f5f5f5;"&gt;channels&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;have a Rising edge or Falling edge,it can trigger ADC,if channels have no edge,it do not trigger ADC；but now&amp;nbsp;if&amp;nbsp;I add &lt;SPAN style="background-color: #ffffff;"&gt;FTM1-&amp;gt;EXTTRIG |=&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;FTM_EXTTRIG_INITTRIGEN_MASK&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;;It will trigger automatically and do not stop;I want to know if the FTM channel can trigger ADC like that?&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 0cm; background: white;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #51626f;"&gt;Here's FTM1 initialization.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 0cm; background: white;"&gt;&lt;/P&gt;&lt;P style="margin-left: 0cm; background: white;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #51626f;"&gt;SIM-&amp;gt;SCGC6 |= SIM_SCGC6_FTM1_MASK;&lt;BR /&gt; FTM1-&amp;gt;MOD = period -1;&lt;BR /&gt; FTM1-&amp;gt;CNTIN =0;&lt;BR /&gt; FTM1-&amp;gt;CNT =0;&lt;BR /&gt; FTM1-&amp;gt;SC= FTM_SC_CLKS(1)|FTM_SC_PS(7);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 0cm; background: white;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #51626f;"&gt;//FTM1-&amp;gt;EXTTRIG |=FTM_EXTTRIG_CH1TRIG_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 0cm; background: white;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #51626f;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;FTM1-&amp;gt;EXTTRIG |=&lt;/SPAN&gt;FTM_EXTTRIG_INITTRIGEN_MASK;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 05:16:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-trigger-via-FTM-channels-Rising-edge-or-Falling-edge/m-p/804698#M48907</guid>
      <dc:creator>529533342</dc:creator>
      <dc:date>2018-12-17T05:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: ADC trigger via FTM channels Rising edge or Falling edge</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-trigger-via-FTM-channels-Rising-edge-or-Falling-edge/m-p/804699#M48908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi yu wu,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This problem is the same question as the post in the eefocus, which I already reply you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You told me that you are using K60 chip.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; From the K60 reference manual:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/70433i75489F4AD75B1732/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So, if you enable the INITTRIGEN, the trigger will happen when the FTM coutner equal to CNTIN register.&lt;/P&gt;&lt;P&gt;If you want to use the edge, I think you can use the cannel trigger.&lt;/P&gt;&lt;P&gt;But please note, PWM will be always send out the PWM wave, so the edge will always happen, if your PWM not stop, the ADC trigger also will happen.&lt;/P&gt;&lt;P&gt;Then, if you want to stop the ADC trigger, you need to disable the PWM wave, or you can use the software trigger ADC instead of the hardware trigger, then you can use the software code to control the ADC is triggered or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have question about it, please kindly let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2018 08:01:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC-trigger-via-FTM-channels-Rising-edge-or-Falling-edge/m-p/804699#M48908</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-12-18T08:01:08Z</dc:date>
    </item>
  </channel>
</rss>

