Hello Everyone,
My board is based on MSP430F543x, and the RST/NMI pin is connected to external input which basically generates a 200-msec LOW pulse to reset the firmware. Because I have to save some critical information to flash before reset, I reconfigure the RST/NMI pin to NMI interrupt function. The NMI ISR does:
1. Save critical data1 to 512-byte segment 1 (pre-erased)
2. Erase segment 2.
3. Save critical data2 to segment 2.
4. RESET system by:
a. Restore RST/NMI to default for reset function. This will cause system reset because the input signal is still LOW.
b. Trigger wdog reset as redundant to (a) in case the pulse has passed and signal level returns to HIGH.
This whole operation takes about 26-msec, so well within 200-msec LOW pulse for 4(a), but I just have redundant 4(b) just in case. The board seems to work just fine with this setup. The data is being saved and restored correctly before and after reset. Other user and system NMI interrupts are not being used for now and just return in ISR. I am still working on what I need to do with other NMIs so that the RST/NMI interrupt will never be masked out or preempted.
Is there anything that I could have missed out that could critically effect the RST/NMI and cause system to stop responding? Is there anyone using this pin as NMI function before and would like to share your experience? My goal is to save some critical data before RESET the system. MSP is operating with code on flash, and mostly stays in LPM3 mode. Other tasks may be writing to flash as well, but all functions that erase/write to flash will have interrupt disabled.
Thank you for your input in advance.
Loc