<?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 Why is my program hanging when trying to get interrupt working? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-is-my-program-hanging-when-trying-to-get-interrupt-working/m-p/451703#M26808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I’ve been working on a problem with the Kinetis software development for a couple of days, and I think I’m at a point where I could use some help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I am trying to get an interrupt working with the Flex Timer Module (FTM) to do an input capture.&amp;nbsp;&amp;nbsp; I’ve been able to get the input capture to work with software polling, but I’d like to tie the rising edge of the signal drive an interrupt service routine. Whenever I enable the interrupt for the specific FTM channel (FTM2 channel 0) I’m using (and enable global interrupts for the FTM), the whole program hangs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I am clearing the CHnF bit for the channel in the interrupt service routine (or at least, I think I am), so it does not continuously fire (which can cause hanging).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I have successfully set up an interrupt service routine for the Programmable Interrupt Timer (PIT), and it is working.&amp;nbsp;&amp;nbsp; So, I have experience making an ISR work on this hardware.&amp;nbsp; I am setting up the FTM ISR in the same way I’m setting up the PIT ISR, so I can’t see why it’s not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I thought perhaps increasing the priority of the FTM interrupt might help, but that really should not be the issue.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Any thoughts?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Adam&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2015 18:30:03 GMT</pubDate>
    <dc:creator>adamgarrison</dc:creator>
    <dc:date>2015-04-28T18:30:03Z</dc:date>
    <item>
      <title>Why is my program hanging when trying to get interrupt working?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-is-my-program-hanging-when-trying-to-get-interrupt-working/m-p/451703#M26808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I’ve been working on a problem with the Kinetis software development for a couple of days, and I think I’m at a point where I could use some help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I am trying to get an interrupt working with the Flex Timer Module (FTM) to do an input capture.&amp;nbsp;&amp;nbsp; I’ve been able to get the input capture to work with software polling, but I’d like to tie the rising edge of the signal drive an interrupt service routine. Whenever I enable the interrupt for the specific FTM channel (FTM2 channel 0) I’m using (and enable global interrupts for the FTM), the whole program hangs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I am clearing the CHnF bit for the channel in the interrupt service routine (or at least, I think I am), so it does not continuously fire (which can cause hanging).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I have successfully set up an interrupt service routine for the Programmable Interrupt Timer (PIT), and it is working.&amp;nbsp;&amp;nbsp; So, I have experience making an ISR work on this hardware.&amp;nbsp; I am setting up the FTM ISR in the same way I’m setting up the PIT ISR, so I can’t see why it’s not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I thought perhaps increasing the priority of the FTM interrupt might help, but that really should not be the issue.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Any thoughts?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Adam&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 18:30:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-is-my-program-hanging-when-trying-to-get-interrupt-working/m-p/451703#M26808</guid>
      <dc:creator>adamgarrison</dc:creator>
      <dc:date>2015-04-28T18:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my program hanging when trying to get interrupt working?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-is-my-program-hanging-when-trying-to-get-interrupt-working/m-p/451704#M26809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might gain some insight in the FTM ISRs I posted in this thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/350276"&gt;Cannot get quadrature decoder to work on K64F FTM2 using KSDK PEx/BM MQX&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 00:58:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Why-is-my-program-hanging-when-trying-to-get-interrupt-working/m-p/451704#M26809</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2015-04-29T00:58:27Z</dc:date>
    </item>
  </channel>
</rss>

