<?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>Kinetis Microcontrollers中的主题 Re: Does FTM output when timer is stopped go high impedance?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369573#M19099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Jan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the question how to implement the masking function, I suggest you read the an5142, which has the code to implement the masking function.&lt;/P&gt;&lt;P&gt;You can download the application note from the website:&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1" title="http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1"&gt;http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your solution "I wanted to mask the output before starting the timer, then unmask it when starting the timer without creating a race condition, and then mask it again before the timer is stopped.", unfortunately, masking function can not function when the FTM is not running(I means the CLKS bit is zero). The masking function is valid only when the FTM is running by setting up the CLKS bit in NO_Zero value.&lt;/P&gt;&lt;P&gt;Anyway, connecting a pull up/down resistor is a good design for the PWM pins so that the PWM pin has a fixed logic after power up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not have a pull up/down resistor on PWM pins, setting up the PWM pin in GPIO output mode is okay as you have done. After the FTM is running, and output PWM signal by switching the pin from GPIO to PWM output mode, if you want to stop to output PWM signal, I suggest you just mask the PWM pin with masking function while the FTM still runs. When you want to output PWM signal again, just unmask the PWM pin, it is okay.&lt;/P&gt;&lt;P&gt;Hope it can help you.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jan 2016 09:31:20 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2016-01-04T09:31:20Z</dc:date>
    <item>
      <title>Does FTM output when timer is stopped go high impedance?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369567#M19093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the state of FTM output when using EPWM (FTM1_C0SC = (FTM_CnSC_MSB_MASK | FTM_CnSC_ELSB_MASK)) and the timer is stopped using FTM1_SC &amp;amp;= ~FTM_SC_CLKS_MASK ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that the output goes high impedance, which I found unexpected and could not find described in the documentation. I expected the output to remain at the same level that it was just before the timer was stopped.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 08:15:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369567#M19093</guid>
      <dc:creator>jrychter</dc:creator>
      <dc:date>2014-12-22T08:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Does FTM output when timer is stopped go high impedance?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369568#M19094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jan Rychter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested the K40, if I enable the FTM and output PWM signal, then clear the CLKS bits in FTM_SC to disable the FTM, the FTM_CHx channel will be in HIGH IMPEDANCE state, the external pull up/down resistor will determine the pin logic state.&lt;/P&gt;&lt;P&gt;I tested it on TWR-K40x256 board and CW for mcu ver10.6.&lt;/P&gt;&lt;P&gt;I attach the code here.&lt;/P&gt;&lt;P&gt;void FtmPinassignment(void);&lt;/P&gt;&lt;P&gt;void PWMOutput_EdgeAlignment(void);&lt;/P&gt;&lt;P&gt;void stop(void);&lt;/P&gt;&lt;P&gt;void delay(void);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int counter = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("nop");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("nop");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("nop");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("nop");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("nop");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("nop");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FtmPinassignment();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PWMOutput_EdgeAlignment();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_OUTINIT=0xFF;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stop();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("nop");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_OUTINIT=0x00;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PWMOutput_EdgeAlignment();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stop();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("nop");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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; counter++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void PWMOutput_EdgeAlignment(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIM_SCGC6|=0x03000000; //enable FTM0 and FTM0 module clock&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_CONF=0xC0; //set up BDM in 11 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_FMS=0x00; //clear the WPEN so that WPDIS is set in FTM0_MODE reg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_MODE|=0x05; //enable write the FTM CnV register&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_MOD=1000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_C0SC=0x28; //edge-alignment, PWM initial state is High, becomes low after match &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_C1SC=0x28; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_COMBINE=0x02; //complementary mode for CH0&amp;amp;CH1 of FTM0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_COMBINE|=0x10; // dead timer insertion enabled in complementary mode for CH0&amp;amp;CH1 of FTM0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_C1V=500;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_C0V=500;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_C2SC=0x28; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_C3SC=0x28; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_COMBINE|=0x0200; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_COMBINE|=0x1000; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_DEADTIME=0x00; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_C3V=250;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_C2V=250;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_CNTIN=0x00;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_SC=0x08; //PWM edge_alignment, system clock driving, dividing by 1&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void stop(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTM0_SC=0x00;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void delay(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int i,j;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0; i&amp;lt;1000; i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(j=100; j&amp;lt;100; j++)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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;&amp;nbsp; asm("nop");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void FtmPinassignment(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIM_SCGC5=SIM_SCGC5|0x3E00; //enable port A/B/C/D/E clock &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC_PCR1=0x400; //PTC1 in FTM mode&amp;nbsp;&amp;nbsp;&amp;nbsp; :FTM0_CH0:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC_PCR2=0x400; //PTC2 in FTM mode&amp;nbsp;&amp;nbsp;&amp;nbsp; :FTM0_CH1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC_PCR3=0x400; //PTC3 in FTM mode&amp;nbsp;&amp;nbsp;&amp;nbsp; :FTM0_CH2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC_PCR4=0x400; //PTC4 in FTM mode&amp;nbsp;&amp;nbsp;&amp;nbsp; :FTM0_CH3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //PTD pins&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD_PCR4=0x400; //PTD4 in FTM mode&amp;nbsp;&amp;nbsp;&amp;nbsp; :FTM0_CH4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTD_PCR5=0x400; //PTD5 in FTM mode&amp;nbsp;&amp;nbsp;&amp;nbsp; :FTM0_CH5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //PTA pins&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTA_PCR1=0x300; //PTA1 in FTM mode&amp;nbsp;&amp;nbsp;&amp;nbsp; :FTM0_CH6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTA_PCR2=0x300; //PTA2 in FTM mode&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :FTM0_CH7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //configure PTB2 as FTM0_FLT3 as ALT6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB_PCR2=0x600; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC_PCR11=0x100; //PTC11 in GPIO mode and output mode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOC_PDDR=0x800; //PTC direction register, PTC11 is in output mode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //in generally, PTC7 is in GPIO output mode, as an indicator to display if an ISR is executed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTC_PCR7=0x100; //PTC7 in GPIO mode and output mode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOC_PDDR=0x80; //PTC direction register, PTC7 is in output mode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //PTA6 is toggled by ISR of PIT1 module, which can be an&amp;nbsp; Fault or capture signal to test the Fault or capture function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTA_PCR6=0x100; //PTA6 in GPIO mode and output mode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOA_PDDR=0x40; //PTC direction register, PTA6 is in output mode, PTA6 is pin5 of J4 on TWR-K40 board&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //FTM1 quadrature mode input pin configuration&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //PORTA_PCR8=0x600;&amp;nbsp;&amp;nbsp; //PTA8 is the FTM1 quadrature signal input pin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //PORTA_PCR9=0x600;&amp;nbsp;&amp;nbsp; //PTA9 is the FTM1 quadrature signal input pin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //PTB0&amp;nbsp; function as&amp;nbsp; FTM1_QD_PHA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB_PCR0=0x600;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //PTB1 functions as FTM1_QD_PHB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB_PCR1=0x600;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 02:42:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369568#M19094</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2014-12-23T02:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Does FTM output when timer is stopped go high impedance?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369569#M19095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your response. Do you have any suggested workaround that does not require an external resistor? I already have boards that do not have it, and the final design will be space-constrained, so I'd much rather not have it at all, if possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am generating a series of precise pulses using the FTM (using DMA). Perhaps there is another way to halt the pulse generation without stopping the FTM clock? Or perhaps there is a way to keep the line low when the FTM clock is turned off?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand, I could switch the pin to GPIO using the PCR register, and with pre-configured GPIO registers that would hold the line low after my pulses are done. But how do I *start* the transmission? I can see no way to switch the pin from GPIO to FTM and start the timer without introducing a race condition (pin becoming high-impedance for a moment).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be very welcome.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Dec 2014 17:36:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369569#M19095</guid>
      <dc:creator>jrychter</dc:creator>
      <dc:date>2014-12-29T17:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Does FTM output when timer is stopped go high impedance?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369570#M19096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Jan Rychter,&lt;/P&gt;&lt;P&gt;If you do not connect external pull up/down resistor on PCB, and you want to have the PWM pin keep low so that the power device can turn off. I recommend you use mask function, when you mask the pin by writing the FTMx_OUTMASK register, after the mask function, the FTM_CHx pin logic is driven to low or high, which is determined by the bit in FTMx_POL register. For example, if the bit0 POL0 in FTMx_POL is cleared, after masking function, the FTM_CH0 will be driven to low. You can use software synchronization to make the mask feature function.&lt;/P&gt;&lt;P&gt;Pls refer to the an4560, which tell you how to use software synchronization to have masking feature function.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 08:16:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369570#M19096</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2015-01-07T08:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Does FTM output when timer is stopped go high impedance?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369571#M19097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you — this is a very helpful suggestion!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 09:03:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369571#M19097</guid>
      <dc:creator>jrychter</dc:creator>
      <dc:date>2015-01-07T09:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Does FTM output when timer is stopped go high impedance?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369572#M19098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had to do some work on this project again and actually tried to implement the OUTMASK scheme. Unfortunately, it doesn't quite work as I expected. The OUTMASK register has impressively complex synchronization patterns, but the one pattern I was looking for is missing: I wanted it to be synchronized just as CnV is. I wanted to mask the output before starting the timer, then unmask it when starting the timer without creating a race condition, and then mask it again before the timer is stopped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't seem you can do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I ended up doing is just switching the PORT MUX to GPIO before stopping the timer, and switching it back to timer functionality just before starting the timer. This does create a race condition (I switch the pin to FTM, but the FTM isn't running yet) when the pin might briefly float, but since it was grounded before, this doesn't seem to be a problem in practice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, I think making the output float when the timer is stopped was a bad idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jan 2016 18:15:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369572#M19098</guid>
      <dc:creator>jrychter</dc:creator>
      <dc:date>2016-01-03T18:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Does FTM output when timer is stopped go high impedance?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369573#M19099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Jan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the question how to implement the masking function, I suggest you read the an5142, which has the code to implement the masking function.&lt;/P&gt;&lt;P&gt;You can download the application note from the website:&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1" title="http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1"&gt;http://cache.nxp.com/files/32bit/doc/app_note/AN5142.pdf?fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your solution "I wanted to mask the output before starting the timer, then unmask it when starting the timer without creating a race condition, and then mask it again before the timer is stopped.", unfortunately, masking function can not function when the FTM is not running(I means the CLKS bit is zero). The masking function is valid only when the FTM is running by setting up the CLKS bit in NO_Zero value.&lt;/P&gt;&lt;P&gt;Anyway, connecting a pull up/down resistor is a good design for the PWM pins so that the PWM pin has a fixed logic after power up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not have a pull up/down resistor on PWM pins, setting up the PWM pin in GPIO output mode is okay as you have done. After the FTM is running, and output PWM signal by switching the pin from GPIO to PWM output mode, if you want to stop to output PWM signal, I suggest you just mask the PWM pin with masking function while the FTM still runs. When you want to output PWM signal again, just unmask the PWM pin, it is okay.&lt;/P&gt;&lt;P&gt;Hope it can help you.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 09:31:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Does-FTM-output-when-timer-is-stopped-go-high-impedance/m-p/369573#M19099</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-01-04T09:31:20Z</dc:date>
    </item>
  </channel>
</rss>

