A few questions here along the same lines, I'm looking at the datasheet for the MSP430x2xx family (I'm using the MSP430F235 FWIW). It says there in section 2.2.4 that "illegal instruction fetch" is an interrupt source for the Reset vector. Then separately under 2.2.1 under the topic of Non-Maskable Interrupts (NMI), "An access violation to the flash memory" is cited as a source.
(1) Can anyone explain to me the difference between (and/or causes of) these two apparently distinct event sources (with different apparently different consequences)?
(2) Can I write an ISR for the NMI source, and make it act like a soft reset by reinitializing the stack pointer and "recursively" calling main or something like that, so that the register and RAM (global variable) state isn't altered?
(3) Assuming I can't intercept the one that results in a Reset vector (which I presume also comes along with a reinitialization of all the registers?), can I at least detect at startup that it happened by checking some status bit to decide what to do about it, and if so which status register/bit would that be?