我又把程序改成了这样试了一下,还是不行,还是只运行到进入停止模式后就没反应了。也不会执行else里面的程序。不知为什么?
unsigned char PDI_FLAG=0;
这是变量的定义
void EXTI9_5_IRQHandler (void)
{
if(EXTI_GetITStatus(EXTI_Line5) != RESET)
{
/* Clear the Key Button EXTI line pending bit */
EXTI_ClearITPendingBit(EXTI_Line5);
if(PDI_FLAG==0)
{
LcdDisZimo0808(4,64,'4',0);
LcdDisZimo0808(5,64,'5',0);
LcdDisZimo0808(6,64,'6',0);
LcdDisZimo0808(7,64,'7',0);
LcdRefreshAll();
Delay(10000);
PDI_FLAG=1;
PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);//进入停止模式
//LcdCommand(0xAE); //关显示
}
else
{
RCC_Configuration(); //初始化时钟
LcdDisZimo0808(4,64,'9',0);
LcdDisZimo0808(5,64,'9',0);
LcdDisZimo0808(6,64,'9',0);
LcdDisZimo0808(7,64,'9',0);
LcdRefreshAll();
Delay(10000);
//LcdCommand(0xAF); //开显示
PDI_FLAG=0;
}
}
}