请问一下香主,STM8L101这款IC在外部中断换醒时的问题:
同时使能PA2,PA3, PB1作为外部中断源输入,只有PA3和PB1能够将单片机从HALT 模式中换醒,PA2能够进入中断服务程序 ,却不能换醒MCU
请帮忙分析一下是什么原因呢?
PA_CR2 =0x0c; //enable PA2,3 as extern interrupt input
PB_CR2 |=0x02; //enable PB1 as extern interrupt input
EXTI_CR1 = 0x58; //setup PA2,PA3 as Rising edge interrupt; PB1 as Falling edge interrupt
ENTERSLEEP_HALT_MODE(); //enter "halt"mode
EXTI_CR1 &=~ 0x50;
PA_CR2 &=~0x0C; //disable PA2,3 extern interrupt input
PA_DDR &= ~0x0C;
PB_CR2 &=~0x02; //disable Pb1 extern interrupt input
PB_DDR &= ~0x02; |