AnsweredAssumed Answered

EXTI does not trigger/fire Please help!

Question asked by shetty.siddharth.001 on Aug 21, 2012
Latest reply on Aug 21, 2012 by shetty.siddharth.001
Hello All,

I have configured an user button(connected to PG15) on the evaluation board(MCBSTM32F200) to generate an interuppt when pressed. The GPIO is iniztialized and works fine however the IRQ handler is never entered. Could someone please help me. The code is as below.

void Exti_Config(void)
{
GPIO_InitTypeDef GPIO_InitStructure;  
EXTI_InitTypeDef EXTI_InitStructure;
NVIC_InitTypeDef NVIC_InitStructure;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOG, ENABLE);  // clock to the GPIO
GPIO_InitStructure.GPIO_Pin  = GPIO_Pin_15;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_Init(GPIOG, &GPIO_InitStructure);
                                                                            
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOG,EXTI_PinSource15);


  EXTI_InitStructure.EXTI_Line = EXTI_Line15;
  EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
  EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;  
  EXTI_InitStructure.EXTI_LineCmd = ENABLE;
  EXTI_Init(&EXTI_InitStructure);


  NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
  NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;
  NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
  NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
  NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
  NVIC_Init(&NVIC_InitStructure);


}


/*Interupt routine which checks if the user button is pressed*/      
void EXTI15_10_IRQHandler(void) 
{
if(EXTI_GetITStatus(EXTI_Line15) != RESET)
{
GLCD_DisplayString (LCD_LINE_NUMBER_7, LCD_COLUMN_NUMBER_16, FONT_INDEX_1,"Xsas");
}
EXTI_ClearITPendingBit(EXTI_Line15);
}

Outcomes