NMI and PTA4 behaviour?

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

NMI and PTA4 behaviour?

Jump to solution
912 Views
q1220200
Contributor III

Hello,

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.

Thanks,

Paul Swanson

1 Solution
774 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Paul Swanson ,

    NMI pin is the special pin, if you don't want to use it, you need to disable it from the FOPT.

   FOPT in the flash configuration field, the address is: 0X40D

  pastedImage_1.png

If you want to disable the NMI pin function, please configure NMI_DIS bit to 0.

Please try it again on your side.


Have a great day,
Kerry

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

3 Replies
775 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Paul Swanson ,

    NMI pin is the special pin, if you don't want to use it, you need to disable it from the FOPT.

   FOPT in the flash configuration field, the address is: 0X40D

  pastedImage_1.png

If you want to disable the NMI pin function, please configure NMI_DIS bit to 0.

Please try it again on your side.


Have a great day,
Kerry

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

775 Views
q1220200
Contributor III

Thanks for your detailed answer, Kerry.

0 Kudos
775 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi  Paul Swanson ,

   You are welcome!

   If you have any further questions about it, please let me know.

   If your question is solved, please help me make the correct answer, just to close this case, thank you!

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos