PWR->CR &= ~(3<<0); //清除PDDS 和LPDSR
PWR->CR |= 1<<0; //set LPDSR
/* Set SLEEPDEEP bit of Cortex System Control Register */
SCB->SCR |= SCB_SCR_SLEEPDEEP;
RCC->APB1ENR &= ~(1<<28); /*关闭电源时钟*/
__WFI();
/* Reset SLEEPDEEP bit of Cortex System Control Register */
SCB->SCR &= (uint32_t)~((uint32_t)SCB_SCR_SLEEPDEEP);
}
一周热门 更多>