Why is my program hanging when trying to get interrupt working?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why is my program hanging when trying to get interrupt working?

567 Views
adamgarrison
Contributor III

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. 

Any thoughts? 


Thanks,

Adam

Labels (1)
Tags (2)
0 Kudos
1 Reply

360 Views
egoodii
Senior Contributor III

You might gain some insight in the FTM ISRs I posted in this thread:

Cannot get quadrature decoder to work on K64F FTM2 using KSDK PEx/BM MQX

0 Kudos