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.
I am trying to get an interrupt working with the Flex Timer Module (FTM) to do an input capture. 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.
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).
I have successfully set up an interrupt service routine for the Programmable Interrupt Timer (PIT), and it is working. So, I have experience making an ISR work on this hardware. 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.
I thought perhaps increasing the priority of the FTM interrupt might help, but that really should not be the issue.