/*按钮GPIOB9进入睡眠,WKUP pin(GPIOA0)唤醒,GPIOD3-LED 200ms闪烁*/
int main(void)
{
/* System Clocks Configuration **********************************************/
RCC_Configuration();
GPIO_Configuration(); /* Enable PWR and BKP clock */
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE); /* Enable WKUP pin */
PWR_WakeUpPinCmd(ENABLE); /* Allow access to BKP Domain */
PWR_BackupAccessCmd(ENABLE); //RTC_Configuration(); EXTI_Configuration(); NVIC_Configuration(); SysTick_Config(SystemFrequency / 1000 *200 ); //200ms while (1)
{
Delay(0xAFFFF); }
}
|