SLAU646F September 2015 – June 2020
To prevent incorrect behavior when two
adjacent instructions both change the global interrupt enable state (see Section 8.2), the C macros for modifying the interrupt state contain NOP instructions. The
following macros are affected and are defined in in430.h
, which is
part of the msp430-gcc-support-files package:
Macros that modify the status register (SR) might be used for purposes other than changing the interrupt state, so NOP instructions in these macros may not be needed. If code size is important, you can examine places your source code uses the _bic_SR_register and _bis_SR_register macros. If NOPs inserted by macros are not needed in some places, you can define your own macros that omit NOPs and use them where appropriate.