<?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: About the S32K146 FTM input capture filter function in S32K</title>
    <link>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245711#M10177</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I took some tests and it works, the calculation seems to be correct, but the FTM filter clock is derived from the FTM System clock not from the FTM function clock (RM rev12.1, Table 27-9. Peripheral module clocking).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Mon, 15 Mar 2021 12:31:47 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2021-03-15T12:31:47Z</dc:date>
    <item>
      <title>About the S32K146 FTM input capture filter function</title>
      <link>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245500#M10161</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Problems with FTM input capture filtering&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1.&lt;SPAN&gt;FTM1 is in input capture mode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2.FTIM1 input clk = 80MHz/128 = 625KHz&lt;/P&gt;&lt;P&gt;3.FTM1.SC.FLTPS = 15 (Divide by 16, filter clk = 625KHz/16 ≈ 40KHz)&lt;/P&gt;&lt;P&gt;4.FTM1.FILTER.CH0FVAL = 15&lt;/P&gt;&lt;P&gt;So,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Filtering time =&amp;nbsp;4 rising edges of FTM input clock+(1 + 4 × CHnFVAL[3:0]) rising edges of FTM filter clock&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 4/625KHz + (1 + 4*15)/40KHz = 6.4us + 1525us ≈ 1530us&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the input PWM signal frequency is 10kHz and the duty cycle is 50%, then the high level time is 50us;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the filtering time is 1.53ms, the pulse should not be detected;But I can still detect the pulse;I don't know where I went wrong;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 08:23:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245500#M10161</guid>
      <dc:creator>ByteWord</dc:creator>
      <dc:date>2021-03-15T08:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: About the S32K146 FTM input capture filter function</title>
      <link>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245711#M10177</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I took some tests and it works, the calculation seems to be correct, but the FTM filter clock is derived from the FTM System clock not from the FTM function clock (RM rev12.1, Table 27-9. Peripheral module clocking).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 12:31:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245711#M10177</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2021-03-15T12:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: About the S32K146 FTM input capture filter function</title>
      <link>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245998#M10181</link>
      <description>&lt;P&gt;&lt;STRONG&gt;hi,thanks for your reply.Your reply has solved my problem.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"the FTM filter clock is derived from the FTM System clock not from the FTM function clock&amp;nbsp;" help me a lot.&lt;/P&gt;&lt;P&gt;For me, the correct formula for filtering time would look something like this&amp;nbsp;:&lt;/P&gt;&lt;P&gt;filtering clk= FTM sys clk/16 = 80MHz/16 = 5MHz&lt;/P&gt;&lt;P&gt;FTM input clk = 80MHz/128 = 625KHz&lt;/P&gt;&lt;P&gt;filtering time =&amp;nbsp;4 rising edges of FTM input clock+(1 + 4 × CHnFVAL[3:0]) rising edges of FTM filter clock&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 4/625KHz + (1 + 4*15)/5MHz = 18.6us&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Therefore, it can detect pulses with a pulse width of 50us;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you again!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 02:46:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245998#M10181</guid>
      <dc:creator>ByteWord</dc:creator>
      <dc:date>2021-03-16T02:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: About the S32K146 FTM input capture filter function</title>
      <link>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1709618#M26368</link>
      <description>&lt;P&gt;i have a same confusion like him,the input capture filter do not work.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 06:40:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1709618#M26368</guid>
      <dc:creator>xxw1</dc:creator>
      <dc:date>2023-08-23T06:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: About the S32K146 FTM input capture filter function</title>
      <link>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1709624#M26369</link>
      <description>&lt;DIV&gt;void FTM1_init(void)&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PCC-&amp;gt;PCCn[PCC_FTM1_INDEX] &amp;amp;= ~PCC_PCCn_CGC_MASK;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PCC-&amp;gt;PCCn[PCC_FTM1_INDEX] |= PCC_PCCn_PCS(0b010)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; PCC_PCCn_CGC_MASK;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FTM1-&amp;gt;MODE |= FTM_MODE_WPDIS_MASK;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FTM1-&amp;gt;SC&amp;nbsp; &amp;nbsp;|= FTM_SC_PS(7);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Prescale Factor Selection&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FTM1-&amp;gt;SC&amp;nbsp; &amp;nbsp;|= FTM_SC_FLTPS(0b1111);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //FLTPS[3:0] ≠ 0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FTM1-&amp;gt;FILTER&amp;nbsp; &amp;nbsp;|= FTM_FILTER_CH1FVAL(0b1111);//CHnFVAL[3:0] ≠ 0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FTM1-&amp;gt;COMBINE = 0x00000000;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FTM1-&amp;gt;POL = 0x00000000;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;according to Table 47-7. FTM Channel Input Filter Delay,register set as below&amp;nbsp;&lt;SPAN&gt;FTM_SC_FLTPS(0b1111)&lt;/SPAN&gt;&lt;SPAN&gt;;FTM_FILTER_CH1FVAL(0b1111);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;it means the delay time can calculate as -&amp;gt; 4 rising edges of FTM input clock +&amp;nbsp;(1 + 4 × CHnFVAL[3:0]) rising edges of FTM filter clock.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FTM input clock:8HMhz(fixed freq)/128 divide=62.5Khz;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FTM filter clock:sys clk(80Mhz)/16 divide = 5Mhz;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;delay time = 4/62.5KHz+61/5Mhz=64us+12.2us=76.2us;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In fact,the input capture can detect 16us period PWM.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Aug 2023 06:51:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1709624#M26369</guid>
      <dc:creator>xxw1</dc:creator>
      <dc:date>2023-08-23T06:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: About the S32K146 FTM input capture filter function</title>
      <link>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1709627#M26370</link>
      <description>&lt;P&gt;hello,i'm &lt;SPAN&gt;struggle in the same problem and can i consult it with you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 06:56:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1709627#M26370</guid>
      <dc:creator>xxw1</dc:creator>
      <dc:date>2023-08-23T06:56:49Z</dc:date>
    </item>
  </channel>
</rss>

