<?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>S32KのトピックRe: FTM PWM input filter</title>
    <link>https://community.nxp.com/t5/S32K/FTM-PWM-input-filter/m-p/1371878#M12801</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;yes, the FTM input filter can be used , see more in chapter 47.5.5.1 Filter for Input Capture Mode of teh RM. It is enough to set&amp;nbsp;&lt;SPAN&gt;FILTER[CH0FVAL] and&amp;nbsp;SC[FLTPS] values.&lt;BR /&gt;&lt;/SPAN&gt;For example&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245500" target="_blank"&gt;https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245500&lt;/A&gt;&amp;nbsp;discusses filtering time calculation&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
    <pubDate>Tue, 16 Nov 2021 09:35:22 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2021-11-16T09:35:22Z</dc:date>
    <item>
      <title>FTM PWM input filter</title>
      <link>https://community.nxp.com/t5/S32K/FTM-PWM-input-filter/m-p/1371267#M12785</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;is there a example for a FTMinput filter configuration?&lt;/P&gt;&lt;P&gt;I would like to debounce a pwm signal. Is the FTM filter useful for this application or should I implement the debouncing with software? Or is there a fitler by default? And are there pullup or pulldown resistors at the input pins?&lt;/P&gt;&lt;P&gt;This is the FTM configuration I am using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/* - Dual-Edge Capture Mode */
void FTM0_Dual_Edge_Capture_Mode()
{
    /* Enable clock for PORTD */
    PCC-&amp;gt;PCCn[PCC_PORTD_INDEX] = PCC_PCCn_CGC_MASK;
    /* Select and enable clock for FTM0 */
    PCC-&amp;gt;PCCn[PCC_FTM0_INDEX] =  PCC_PCCn_PCS(6) | PCC_PCCn_CGC_MASK;

    PORTD-&amp;gt;PCR[15] = PORT_PCR_MUX(2);		// Set PTD15 for FTM0 - Channel0

	S32_NVIC-&amp;gt;ISER[FTM0_Ch0_Ch1_IRQn / 32] |= (1 &amp;lt;&amp;lt; (FTM0_Ch0_Ch1_IRQn % 32));		// Enable interrupt

	/* Enable dual-edge capture mode */
	FTM0-&amp;gt;COMBINE= FTM_COMBINE_DECAPEN0_MASK | FTM_COMBINE_DECAP0_MASK
			     | FTM_COMBINE_DECAPEN1_MASK | FTM_COMBINE_DECAP1_MASK;

	/* Set CNTIN */
	FTM0-&amp;gt;CNTIN = FTM_CNTIN_INIT(0);

	/* Select positive polarity pulse width measurement and enable continuous mode for FTM0_CH0 */
	FTM0-&amp;gt;CONTROLS[0].CnSC =  FTM_CnSC_MSA_MASK | FTM_CnSC_ELSA_MASK;
    FTM0-&amp;gt;CONTROLS[1].CnSC =  FTM_CnSC_ELSB_MASK | FTM_CnSC_CHIE_MASK;

    /* Reset counter */
    FTM0-&amp;gt;CNT = 0;
    /* Select clock */
    FTM0-&amp;gt;SC = FTM_SC_CLKS(1)
    		   |FTM_SC_PS(7);
    FTM0-&amp;gt;MOD = 62500 -1 ;     	/* FTM1 counter final value (used for PWM mode) 			*/
    								/* FTM1 Period = MOD-CNTIN+0x0001 ~= 62500 ctr clks  		*/
    								/* 8MHz /128 = 62.5kHz -&amp;gt;  ticks -&amp;gt; 1Hz 					*/
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 11:08:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FTM-PWM-input-filter/m-p/1371267#M12785</guid>
      <dc:creator>Lauch_Spargel</dc:creator>
      <dc:date>2021-11-15T11:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: FTM PWM input filter</title>
      <link>https://community.nxp.com/t5/S32K/FTM-PWM-input-filter/m-p/1371878#M12801</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;yes, the FTM input filter can be used , see more in chapter 47.5.5.1 Filter for Input Capture Mode of teh RM. It is enough to set&amp;nbsp;&lt;SPAN&gt;FILTER[CH0FVAL] and&amp;nbsp;SC[FLTPS] values.&lt;BR /&gt;&lt;/SPAN&gt;For example&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245500" target="_blank"&gt;https://community.nxp.com/t5/S32K/About-the-S32K146-FTM-input-capture-filter-function/m-p/1245500&lt;/A&gt;&amp;nbsp;discusses filtering time calculation&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 09:35:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FTM-PWM-input-filter/m-p/1371878#M12801</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-11-16T09:35:22Z</dc:date>
    </item>
  </channel>
</rss>

