This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

进入低功耗LPM模式,CPUOFF 为无法置1



F4152 上电开机进入低功耗模式LPM3,正常。

当关机的时候再次进入低功耗LPM3时,CPUOFF位无法置1,一直在关机函数里面打转,无法睡眠。

CPUOFF位无法置1,有哪些原因是其无法置位。

void main( void )
{
WDTCTL = WDTPW + WDTHOLD + WDTCNTCL; // Stop watchdog timer
IFG1 &= ~WDTIFG;
ClockInit();
StartTheSystem();
PortInit();
LCD_Init();
RingCount = 0x00;
RingON;
while(!(P1IN & BIT1));
ValueBattery = BatteryCapacityDetect();
WDTCTL = WDT_ARST_250; //WDT is clocked by fACLK (assumed 32KHz) about 250ms
for(;;)
{
if((P1IN & BIT0) || !(P1IN & BIT2))
{
DelayMS(10);
if(!(P1IN & BIT2))ValueMode = ModeSelect();
if((P1IN & BIT0) && (ValueMode % 2))Strength();
}
LCDDisplay();
if(AutoShutDown())ShutDownTheSystem();
else if(!(P1IN & BIT1))
{
DelayMS(10);
if(!(P1IN & BIT1))
{
while(!(P1IN & BIT1));
DelayMS(10);
if(P1IN & BIT1)ShutDownTheSystem();
}
}
}
}