Texas Instruments MSP430x1xx User Manual
Page 433
Flash Memory, Interrupt and Security Key Violation
C-21
Flash Memory
To protect the software from this error situation, all interrupt sources have to
be disabled since all interrupt requests will fail. The flash memory returns the
vector 03FFFh. Before the interrupt enable bits are modified, they can be
stored in RAM to be restored when the flash memory is ready for access again.
The following interrupt enable bits should be reset to stop all interrupt service
requests:
-
GIE = 0
-
NMIIE = ACCVIE = OFIE = 0
Additionally the watchdog should be halted to prevent its expiration when flash
memory is busy:
-
WDTHOLD = 1
When the flash memory is ready, the interrupt sources can be enabled again.
Before they are enabled, critical interrupt flags should be checked and, if nec-
essary, served or reset by software.
-
GIE = 1 or left disabled, or be restored to the previous level
-
NMIIE = ACCVIE = OFIE = 1 or left disabled, or be restored to the previous
level
-
WDTHOLD = 0 or left disabled, or be restored to the previous level