NMI handler

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

NMI handler

Jump to solution
3,979 Views
andreiszeghy
Contributor I

Hello,

  I'm using an LPC1769 MCU and have pin P2[10] configured as an external interrupt.  I knew this pin was also the Non-Maskable Interrupt, but at the time I was sure that this pin would never be asserted during reset.  Well, of course, come to find out that on rare occasions this pin is triggered, and stays triggered,  when the MCU resets. So the code winds up locked in the NMI handler.

  I am not using the NIM otherwise and the handler currently looks like this:

void NMI_Handler(void)
{
    while(1) {}
}

  Is there anything I can do in the handler to manage the occasions when the MCU reset's with the NMI asserted?

Thanks, any info is greatly appreciated,

Andrei

0 Kudos
Reply
1 Solution
3,642 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Andrei Szeghy

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
According to your description, it seems MCU won't boot up successfully on rare occasion because of P2[10] is 'triggered', is it right?
However, I don't agree with the reason you pointed out, I think the MCU enter into the ISP mode, to validate this assumption, please adding a pull-up resistor (10 KΩ) on the P2[10] pin to terminate this 'issue'。

pastedImage_1.png

Have a great day,
TIC

 

-------------------------------------------------------------------------------
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

0 Kudos
Reply
2 Replies
3,642 Views
andreiszeghy
Contributor I

Hi Jeremy,

   Thanks for the reply.  There already is a pull-up resistor in the circuit, the input being "triggered" is not a bug.  On occasion there is physically something in front of a sensor that I never anticipated being there. 

  My mistake, you are correct, I overlooked the ISP mode detail on that pin!  A lot of bad words are firing off in my head!  I don't think there is any way to get out of this scenario.  I'll have to make some non programmatic changes to work around this.

Thank you,

Andrei

0 Kudos
Reply
3,643 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Andrei Szeghy

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
According to your description, it seems MCU won't boot up successfully on rare occasion because of P2[10] is 'triggered', is it right?
However, I don't agree with the reason you pointed out, I think the MCU enter into the ISP mode, to validate this assumption, please adding a pull-up resistor (10 KΩ) on the P2[10] pin to terminate this 'issue'。

pastedImage_1.png

Have a great day,
TIC

 

-------------------------------------------------------------------------------
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
Reply