<?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: K22F FTM0CH2 PWM output interfering on gpio interrupt</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-FTM0CH2-PWM-output-interfering-on-gpio-interrupt/m-p/704768#M43271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Mohamed,&lt;/P&gt;&lt;P&gt;I have checked the signal assignment of K22, the PTC5 and PTD6 are independent signals. Pls check if the PTC5 and PTD6 are connected on your PCB board unexpectedly?&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, 16 Oct 2017 02:27:50 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2017-10-16T02:27:50Z</dc:date>
    <item>
      <title>K22F FTM0CH2 PWM output interfering on gpio interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-FTM0CH2-PWM-output-interfering-on-gpio-interrupt/m-p/704767#M43270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;BR /&gt;I'm using K22F to generate PWM signal to drive a simple fan and use gpio falling edge interrupt to get tachy return from this fan.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My pin conf is:&lt;/P&gt;&lt;P&gt;- I use FTM0CH2 on&amp;nbsp;PTC5 output (means ALT7 as IO configuration)&lt;/P&gt;&lt;P&gt;- I use PTD6 as an input GPIO (ALT1) to get falling edge interrut on tachy signal&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My problem is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when FM0CH2 pwm output is driven to other pin than PTC5 (say PTA5 for example) the PTD6 interrupt comes as expected on falling edge of input signal (I toggle a third signal inside isr to see on scope how often the interrupt comes)&lt;BR /&gt;BUT&lt;BR /&gt;as soon as PWM is driven on PTC5 then the interrupt looks like missing or adding edges even if input signal wave is not changed.&lt;BR /&gt;Any has already met an effect FTM0CH2 and other pins interrupt even if they not part of same IO port (PDx different PCx)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is some parts of my code:&lt;BR /&gt;PWM configuration:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;// Configure GPIO for FTM0_CH2 function&lt;BR /&gt; PORT_PCR_REG(PORTC_BASE_PTR, 5) = PORT_PCR_MUX(ALT7) | PORT_PCR_PE_MASK | PORT_PCR_PS_MASK;&lt;BR /&gt; // Enable clock gate to FM0 module&lt;BR /&gt; SIM_SCGC6 |= SIM_SCGC6_FTM0_MASK;&lt;/P&gt;&lt;P&gt;FTM0_MOD = u16ftm_mod; // FTM0 Modulo PWM period&lt;BR /&gt; //FTM0_C2SC = 0x28; // No Interrupts; High True pulses on Edge Aligned PWM&lt;/P&gt;&lt;P&gt;// FTMx_CnSC - contains the channel-interrupt status flag control bits&lt;BR /&gt; FTM0_C2SC |= FTM_CnSC_ELSB_MASK; //Edge or level select&lt;BR /&gt; FTM0_C2SC &amp;amp;= ~FTM_CnSC_ELSA_MASK; //Edge or level Select&lt;BR /&gt; FTM0_C2SC |= FTM_CnSC_MSB_MASK; //Channel Mode select&lt;/P&gt;&lt;P&gt;FTM0_C2V = u16ftm_cnt; // duty_cyle_percent% pulse width&lt;BR /&gt; FTM0_SC = (1 &amp;lt;&amp;lt; 3) | (6 &amp;lt;&amp;lt; 0); // Edge Aligned PWM running from BUSCLK / 64&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GPIO interrupt setup:&lt;/P&gt;&lt;P&gt;PORT_PCR_REG(PORTD_BASE_PTR, 6) = PORT_PCR_MUX(0x01) | PORT_PCR_PE_MASK | PORT_PCR_PS_MASK;&lt;BR /&gt; // Enable gpio functionality for given pin, react on falling edge&lt;BR /&gt; if(lwgpio_int_init(&amp;amp;Gpio_FAN_TACHY, LWGPIO_INT_MODE_FALLING)) {&lt;BR /&gt; // Install the interrupt directly to the vector table in the processor&lt;BR /&gt; if(_int_install_isr(lwgpio_int_get_vector(&amp;amp;Gpio_FAN_TACHY), fan_tachy_isr, NULL)) {&lt;BR /&gt; // Set the interrupt level, and unmask the interrupt in interrupt controller&lt;BR /&gt; if(MQX_OK == _bsp_int_init(lwgpio_int_get_vector(&amp;amp;Gpio_FAN_TACHY), 1, 0, TRUE)) {&lt;BR /&gt; // Enable interrupt on GPIO peripheral module&lt;BR /&gt; lwgpio_int_enable(&amp;amp;Gpio_FAN_TACHY, TRUE);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 09:10:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-FTM0CH2-PWM-output-interfering-on-gpio-interrupt/m-p/704767#M43270</guid>
      <dc:creator>emoha</dc:creator>
      <dc:date>2017-10-12T09:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: K22F FTM0CH2 PWM output interfering on gpio interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-FTM0CH2-PWM-output-interfering-on-gpio-interrupt/m-p/704768#M43271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Mohamed,&lt;/P&gt;&lt;P&gt;I have checked the signal assignment of K22, the PTC5 and PTD6 are independent signals. Pls check if the PTC5 and PTD6 are connected on your PCB board unexpectedly?&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, 16 Oct 2017 02:27:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-FTM0CH2-PWM-output-interfering-on-gpio-interrupt/m-p/704768#M43271</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2017-10-16T02:27:50Z</dc:date>
    </item>
  </channel>
</rss>

