Hello. I have a mature product that has been in the field for the last 18 months. Just recently I have had 4 product returns where the product had gone to sleep as expected but would not wake up. Only a full power cycle would wake the processor up. The code to put into HALT mode is pretty simple:
// set the low power mode to HALT and execute the IDLE command
EALLOW;
if (SysCtrlRegs.PLLSTS.bit.MCLKSTS != 1) // Only enter low power mode when PLL is not in limp mode.
{
SysCtrlRegs.LPMCR0.bit.LPM = 2;
//select HALT mode
FlashRegs.FPWR.bit.PWR = 0;
//turn off Flash power during Halt Mode
AdcRegs.ADCTRL3.bit.ADCPWDN = 0;
//ditto ADC
AdcRegs.ADCTRL3.bit.ADCBGRFDN = 0;
//dittp ADC Band Gap Reference
}
EDIS;
asm(" IDLE"); /* Force device into HALT */
I have the interrupt configured to execute the wakeup logic. On these defective products the wakeup executes correctly 9 out of 10 times at least. It is not easy to to reproduce. From our scope shots we see the crystal begin oscillating when the wakeup goes low. On a good wakeup the crystal continues to oscillate and the DSP wakes up and the clockout shows activity. On a bad wakeup, the crystal stops oscillating when the wakeup goes back to the high state.
I would appreciate any help and suggestions on this issue. Thanks in advance.
Chris