2009-07-01 05:46 PM
2011-05-17 12:58 AM
GPIO3 generates INT on EXTIT0_ITLine.(WIU group0 VIC1.10)
Use EXTIT0_ITLine instead of EXTIT2_ITLine2011-05-17 12:58 AM
Dear All,
I am trying to get external interrupt 2 on port pin 3.2 of MCU. I have done the following configuration but the code never enters the ISR section. Also i have checked the configuration in simulator of KEIL, the VIC section shows that the group2 interrupt has been set, while i had set the extint2. Please check the code and help me out with this problem. /* Enable the GPIO3 */ SCU_APBPeriphClockConfig(__GPIO3, ENABLE); SCU_APBPeriphReset(__GPIO3,DISABLE); /*out of RESET state*/ /* Enable WIU clock */ SCU_APBPeriphClockConfig(__WIU, ENABLE); /* Enable VIC clock */ SCU_AHBPeriphClockConfig(__VIC,ENABLE); SCU_AHBPeriphReset(__VIC,DISABLE); /* out of RESET state*/ // 3.2 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2 ;// GPIO_InitStructure.GPIO_Direction = GPIO_PinInput; GPIO_InitStructure.GPIO_Type = GPIO_Type_OpenCollector; GPIO_Init (GPIO3, &GPIO_InitStructure); VIC_Config(EXTIT2_ITLine, VIC_IRQ,2); VIC_ITCmd(EXTIT2_ITLine, ENABLE); WIU_DeInit(); WIU_StructInit(&WIU_InitStruct); WIU_InitStruct.WIU_TriggerEdge = WIU_FallingEdge; WIU_InitStruct.WIU_Line = WIU_Line2; WIU_Init(&WIU_InitStruct); WIU_Cmd(ENABLE); SCU_WakeUpLineConfig(2); WIU_ClearITPendingBit(WIU_Line2); WIU_ClearITPendingBit(2); Other codes are also used for UART and RTC, they are working fine as interrupts. Please ask if any more information or code is required. Thanks and regards.2011-05-17 12:58 AM
Thanks for the help, now it is working.