AnsweredAssumed Answered

How to make KEA128 enter sleep mode ?

Question asked by Hunter zheng on Nov 1, 2016
Latest reply on Nov 2, 2016 by Hunter zheng

i want to make kea128 enter stop mode , here are my configuration code bellow

 

PMC->SPMSC1 = 0x80;
PMC->SPMSC2 = 0x00;
PMC->SPMSC1 &= ~PMC_SPMSC1_LVWIE_MASK;
/* disable LVD in stop mode */
PMC->SPMSC1 &= ~(PMC_SPMSC1_LVDE_MASK | PMC_SPMSC1_LVDRE_MASK |
PMC_SPMSC1_LVDSE_MASK);
/* Set the SLEEPDEEP bit to enable deep sleep mode (STOP) */
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
/* Not using KEIL's uVision, so use the standard assembly command */
__WFI;

while(1)

{

}

 

but  MCU don't go to sleep , it continue run codes in while loop, rather stop in the front of while ! what i should do to make kea128 enter sleep mode ?

Outcomes