时钟配置是这样:BLPI mode , MCGIRCLK enable in stop
初始化VLPR模式后寄存器:PMPROT:0x20,PMCTRL:0x48,STOPCTRL:0x00,PMSTAT:0x04
有一点STOPA总是被只为1很奇怪。
进入VLPS的代码如下:
SMC_STOPCTRL = (SMC_STOPCTRL_PSTOPO(0x00) | SMC_STOPCTRL_VLLSM(0x00));
/* Set the STOPM field to 0b010 for VLPS mode */
SMC_PMCTRL &= ~SMC_PMCTRL_STOPM_MASK;
SMC_PMCTRL |= SMC_PMCTRL_STOPM(0x2);
dummyread = SMC_PMCTRL;
SCB_SCR |= SCB_SCR_SLEEPDEEP_MASK;
__asm("WFI");
进入后UART向MCU发消息无法唤醒,RESET之后才会收到UART的消息。 |