调试STM8遇到的问题 在调试STM8L051的单片机时,使用的多个外部中断,当进入某外部中断的中断服务函数后,原来是想进入这个中断时,不再响应其他中断,就先关闭全局中断,待处理完成后再打开全局中断,代码如下: INTERRUPT_HANDLER(EXTI4_IRQHandler,12)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
if(GPIO_ReadInputDataBit(HSJ160_INT2_GPIO_PORT, HSJ160_INT2_GPIO_PIN) == 0)
{
disableInterrupts();
Bsp_SetReadRfidFlag(2,1);
enableInterrupts();
}
EXTI_ClearITPendingBit(EXTI_IT_Pin4);
}
|