SLAZ271AB October 2012 – May 2021 MSP430F5327
CPU Module
Compiler-Fixed
Program Counter (PC) is corrupted during the context save of a nested interrupt
When a low power mode is entered within an interrupt service routine that has enabled nested interrupts (by setting the GIE bit), and the instruction that sets the low power mode is directly followed by a RETI instruction, an incorrect value of PC + 2 is pushed to the stack during the context save. Hence, the RETI instruction is not executed on return from the nested interrupt and the PC becomes corrupted.
Insert a NOP or __no_operation() intrinsic function between the instruction that sets the lower power mode and the RETI instruction.
Refer to the table below for compiler-specific fix implementation information.
IDE/Compiler | Version Number | Notes |
---|---|---|
IAR Embedded Workbench | IAR EW430 v6.20 until v6.40 | User is required to add the compiler or assembler flag option below. --hw_workaround=nop_after_lpm |
IAR Embedded Workbench | IAR EW430 v6.40 or later | Workaround is automatically enabled |
TI MSP430 Compiler Tools (Code Composer Studio) | v4.1.3 or later | |
MSP430 GNU Compiler (MSP430-GCC) | MSP430-GCC 4.9 build 167 |