I'm using a MSP432E401Y on a custom board and would like to use the NMI function of the PD7 pin.
How can I attach a callback to the NMI ? Can it be on a falling edge ?
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.
Hi Victor, I also do not find a function that can configure the GPIO as NMI mode and there is a note that in the gpio.c in driver lib.
"\note A subset of GPIO pins, notably those used by the
//! JTAG/SWD interface and any pin capable of acting as an NMI input, are
//! locked against inadvertent reconfiguration. These pins must be unlocked
//! using direct register writes to the relevant GPIO_O_LOCK and GPIO_O_CR
//! registers before this function can be called."
My recommendation is that you can try to enable the NMI function and use the default NMI handler that I have post before.
I saw that but I understood that the pin is locked as NMI by default and if I want to use it as a GPIO I have to unlock it. Is that right ?
In which file should I put the NMI handler ? I tried but couldn't make it work.
Hi Victor, The PD7 is GPIO function by default. If you want to make it as NMI mode you can try the code bellow I have not a hardware to verify it you can try to run it on hardware to see if it works