-
HC32L110C6UA端口中断问题
华大HC32L110C6UA芯片配置P03端口输入下降沿中断,一旦触发中断就会一直进入端口中断,有对M0P_GPIO->P3ICLR写入0操作,并读取M0P_GPIO->P3ICLR和M0P_GPIO->P0STAT_f寄存器发现值并没有变化。不知道是有哪里没有设置好,各位大神帮忙看看!如下是程序过程:voidGpio_IRQHandler(uint8_tu8Param){uint32_tread_stat=0;switch(u8Param){case0:{}break;case1:{}break;case2:{}break;case3:{}break;default:;break;}*((uint32_t*)((uint32_t)&M0P_GPIO->P3ICLR+u8Param*0x40))=0;read_stat=*((uint32_t*)((uint32_t)&M0P_GPIO->P3ICLR+u8Param*0x40));read_stat=*((uint32_t*)((uint32_t)&M0P_GPIO->P0STAT_f+u8Param*0x40));}int32_tmain(void){Gpio_InitIOExt(0,3,GpioDirIn,FALSE,FALSE,FALSE,FALSE);Gpio_ClearIrq(0,3);//上升沿Gpio_EnableIrq(0,3,GpioIrqFalling);EnableNvic(PORT0_IRQn,DDL_IRQ_LEVEL_DEFAULT,TRUE);while(1){}}
2021-01-04 2