请问各位,我讲外部按键用作//pc6//pc7//pc10//pc11
然后将PC6设置为外部中断,进入睡眠后pc6 pc7 pc10 pc11
都能唤醒?
//Enable the EXTI9_5 Interrupt
NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;//抢占优先级
//比系统定时器高
//系统定时器设置为3
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;//响应
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//Enable the EXTI15_10 Interrupt
NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;//抢占优先级
//比系统定时器高
//系统定时器设置为3
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;//响应
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//时钟采样的中断
//Enable the EXTI2 Interrupt
NVIC_InitStructure.NVIC_IRQChannel = EXTI2_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;//抢占优先级
//比系统定时器高
//系统定时器设置为3
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;//响应
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
/////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////// |