Currently, we read the "MSP430FR2155 errata documentation".
The CS13 issue, we may encounter in our product life time. We use the LPM3.0 and use RTC ISQ to wakeup MCU every 1s. And this device support GPIO exit interrupt.
So it may encounter this CS13 problem while device is entering LPM3.0, An interrupt is requested (e.g. GPIO interrupt or RTC interrupt).
Our DCO frequency is 8Mhz.
There are two questions to ask for you:
1.If this lock up can be recovered by watch dog?
2.We try to use the 4th solution to resolve this issue. My code is shown as follow please check. Is there any thing lost?
Before enter LPM3.0 switch the DOC frequency to 1Mhz from 8Mhz:
#ifdef WU_SWITCH_8M
__bis_SR_register(SCG0); // Disable FLL
CSCTL1 = DCOFTRIMEN_1 | DCOFTRIM0 | DCOFTRIM1 | DCORSEL_0;// DCOFTRIM=3, DCO Range = 1MHz
CSCTL2 = FLLD_0 + 30;
__bic_SR_register(SCG0); // Enable FLL
while(CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1)); // Poll until FLL is locked
//Software_Trim(); // Software Trim to get the best DCOFTRIM value
#endif
// Disable the GPIO power-on default high-impedance mode
// to activate previously configured port settings
PM5CTL0 &= ~LOCKLPM5; // old
if (UTL_BitIsOn(BIT_B_SLEEP)) // anti power on, and out the interrupt, then into sleep mode
{
__bis_SR_register(LPM3_bits | GIE); // Enter LPM3 w/ interrupt ,This line could not add other function line
__no_operation(); // For debug and wait a little time
// RTC or extern intrrupt wake up need to re-init
UTL_BitClear(BIT_B_SLEEP);
}
After wakeup initialize the DOC frequency to 8Mhz from 1Mhz.
{
#ifdef WU_SWITCH_8M
WDTCTL = WDT_ARST_1000;//Clear WDT // wtd time is 3s
__bis_SR_register(SCG0); // Disable FLL
CSCTL1 = DCOFTRIMEN_1 | DCOFTRIM0 | DCOFTRIM1 | DCORSEL_3;// DCOFTRIM=3, DCO Range = 8MHz
CSCTL2 = FLLD_0 + 243; // DCODIV = 8MHz
__bic_SR_register(SCG0); // Enable FLL
while(CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1)); // Poll until FLL is locked
//Software_Trim(); // Software Trim to get the best DCOFTRIM value
#endif
}
P1OUT = 0x00;
P1DIR |= BIT5; //P1.5 PTT control pin output
P1REN |= BIT5;
P1IES = 0x00;
P1IE = 0x00;
......
