__INTERRUPT __HIGH_CODE void?GPIOB_IRQHandler(?void?) { ????if(GPIOB_ReadITFlagBit(GPIO_Pin_4)) ????{ ????????temp?=?R16_PB_INT_IF; ????????PRINT("GPIO41?%d\r\n",?temp); ????????GPIOB_ClearITFlagBit(GPIO_Pin_4); ????????temp?=?R16_PB_INT_IF; ????????PRINT("GPIO42?%d\r\n",?temp); ????} ????if(GPIOB_ReadITFlagBit(GPIO_Pin_10)) ????{ ????????temp?=?R16_PB_INT_IF; ????????PRINT("GPIO101?%d\r\n",?temp); ????????GPIOB_ClearITFlagBit(GPIO_Pin_10); ????????temp?=?R16_PB_INT_IF; ????????PRINT("GPIO102?%d\r\n",?temp); ????} }
現(xiàn)在發(fā)現(xiàn)一個(gè)問題,明明只寫了GPIOB4觸發(fā)中斷,可GPIOB10也能進(jìn)去。隨后我在while里循環(huán)打印R16_PB_INT_IF,發(fā)現(xiàn)它初始值就是已經(jīng)是0XFFFF,為什么要這樣子處理?不應(yīng)該是復(fù)位值0嗎?
熱門產(chǎn)品 :
CH585: 集成高速USB和NFC的藍(lán)牙MCU