This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2155: Usage of RST/NMI pin as a NMI pin taking interrupts from a switch

Part Number: MSP430FR2155

Tool/software:

Hi TI Experts!

I am working with MSP430FR2155 and I am very much new to the concept of Interrupts and ISRs.

In this, I am connecting the RST/NMI (pin 9) to a switch. The functionality of this pin is that whenever a switch is pressed(an interrupt occurs), it has to glow the LEDs. I have a few doubts regarding this:

1. Should I set the PIN 9 as input during initialization?

2. Would this entire process be problematic for the further flashing of the codes? Would it be better if we set another pin for the same purpose?

Thanks in advance!

Have a great day ahead :)

  • Hello Nagashri,

    My colleague will reply to you tomorrow.

    Best Regards,

    Janz Bai

  • Hi,

    If you want to set the PIN 9 as NMI function , you need to follow the below configuration described in the UG.

    "The reset pin can be configured as a reset function (default) or as an NMI function by the Special Function Register (SFR), SFRRPCR. Setting SYSNMI causes the RST/NMI pin to be configured as an external NMI source. The external NMI is edge sensitive and its edge is selectable by SYSNMIIES. Setting the NMIIE enables the interrupt of the external NMI. Upon an external NMI event, the NMIIFG is set."

    And yes, it is not recommend to use the RST/NMI pin to generate a normal interrupt for the MCU. It would be preferred to use any other pin to achieve this interrupt function. 

    Best regards,

    Cash Hao 

  • Hello Cash Hao, 

    Thanks for your response!
    I have implemented those initializations in my code. 

    And yes, it is not recommend to use the RST/NMI pin to generate a normal interrupt for the MCU. It would be preferred to use any other pin to achieve this interrupt function.

    Just out of curiosity, why should we not do this? What would happen?

    Thanks in advance!

  • Hi,

    By default, the RST/NMI pin is configured as RST function. And when you repower the MCU, this pin will be back to RST function during the powering up and before the code runs the configuration NMI function part. there could be conflicts during the function transaction.

    Best regards,

    Cash Hao

  • Hello 
    Thanks for the suggestion sir. Will let my teammates know about it.

**Attention** This is a public forum