//? UART1_Reset();
//? R8_UART1_MCR = 0;
//? R8_UART1_IER = 0;
//? R8_UART1_IIR = 1;
//? R8_UART1_LCR = 0;
//? R8_UART1_LSR = 0x60;
? GPIOA_ModeCfg(GPIO_Pin_8,GPIO_ModeIN_PU);
? GPIOA_ITModeCfg(GPIO_Pin_8,GPIO_ITMode_FallEdge);//PA8 串口喚醒
? PFIC_EnableIRQ(GPIO_A_IRQn);
? PWR_PeriphWakeUpCfg( ENABLE, RB_SLP_GPIO_WAKE, Edge_LongDelay );//喚醒源
? DelayMs( 2 );
? LowPower_Sleep( RB_PWR_RAM16K | RB_PWR_RAM2K );? ? ? ?//只保留14+2K SRAM 供電
? HSECFG_Current( HSE_RCur_100 );? ? ?// 降為額定電流(低功耗函數(shù)中提升了HSE偏置電流)
這是睡眠配置,睡眠前把串口設置成外io喚醒