SLAZ469Z May 2014 – August 2021 MSP430FR5959
PMM Module
Functional
Device may enter lockup state or execute unintentional code during transition from AM to LPM2/3/4
The device might enter lockup state or start executing unintentional code resulting in unpredictable behavior depending on the contents of the address location- if any of the two conditions below occurs:
Condition1:
The following three events happen at the same time:
1) The device transitions from AM to LPM2/3/4 (e.g. during ISR exits or Status Register modifications),
AND
2) An interrupt is requested (e.g. GPIO interrupt),
AND
3) MODCLK is requested (e.g. triggered by ADC) or removed (e.g. end of ADC conversion).
Modules which can trigger MODCLK clock requests/removals are ADC and eUSCI.
If clock events are started by the CPU (e.g. eUSCI during SPI master transmission), they can not occur at the same time as the power mode transition and thus should not be affected. The device should only be affected when the clock event is asynchronous to the power mode transition.
The device can recover from this lockup condition by a PUC/BOR/Power cycle (e.g. enable Watchdog to trigger PUC).
Condition2:
The following events happen at the same time:
1) The device transitions from AM to LPM2/3/4 (e.g. during ISR exits or Status Register modifications),
AND
2) An interrupt is requested (e.g. GPIO interrupt),
AND
3) Neither MODCLK nor SMCLK are running (e.g. requested by a peripheral),
AND
4) SMCLK is configured with a different frequency than MCLK.
The device can recover from this lockup condition by a BOR/Power cycle.
1. Use LPM0/1/x.5 instead of LPM2/3/4.
OR
2. Place the FRAM in INACTIVE mode before any entry to LPM2/3/4 by clearing the FRPWR bit and FRLPMPWR bit (if exist) in the GCCTL0 register. This must be performed from RAM as shown below:
// define a function in RAM
#pragma CODE_SECTION(enterLpModeFromRAM,".TI.ramfunc")
void enterLpModeFromRAM(unsigned short lowPowerMode);
//call this function before any entry to LPM2/3/4
void enterLpModeFromRAM(unsigned short lowPowerMode)
{
FRCTL0 = FRCTLPW;
GCCTL0 &= ~(FRPWR+FRLPMPWR); //clear FRPWR and FRLPMPWR
FRCTL0_H = 0; //re-lock FRCTL
__bis_SR_register(lowPowerMode);
}