AnsweredAssumed Answered

NMI and PTA4 behaviour?

Question asked by Paul Swanson on Jul 9, 2019
Latest reply on Jul 24, 2019 by Kerry Zhou



I just ran into some unexpected behaviour from PTA4 on the FRDM-KL25Z, and hoping someone can help me understand it.


I was trying to use PTA4 as a GPIO input with an IRQ handler. I noticed that when PTA4 was triggered the board's processing came to a halt, turns out that PTA4 is hooked up to an NMI interrupt vector which is just looping infinitely (as per the boilerplate code).


I'm surprised because I had set the MUX bits for that pin to ALT1 yet it seems to have no effect and continues to operate as the NMI (Alt 7).


Firstly, I don't really understand what the NMI does (my guess is that it's just an interrupt that can't be masked by software) and secondly, I can't understand why setting the MUX bits to ALT1 seems to have no impact on this pin.


As an aside, it's somewhat problematic for me, as I've noticed that on this chip / board only Port A and D have interrupts, so I've a limited number of pins I can actually use as interrupt GPIO without disabling other functionality elsewhere.


Anyway, if you could help shed some light on my ignorance that'd be appreciated as always.




Paul Swanson