大家好,我在使用STM32F407的待机功能的时候遇到了不能唤醒的问题,下面是我的代码,请帮我分析一下,万分感谢!
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR,ENABLE);
PWR_ClearFlag (PWR_FLAG_WU);
/* 使能WKUP引脚的唤醒功能 ,使能PA0*/
PWR_WakeUpPinCmd (ENABLE);
[img][/img]
/* Select STANDBY mode */
PWR->CR |= PWR_CR_PDDS;
/* Set SLEEPDEEP bit of Cortex System Control Register */
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
/* This option is used to ensure that store operations are completed */
#if defined ( __CC_ARM )
__force_stores();
#endif
/* Request Wait For Interrupt */
__WFI(); |