AnsweredAssumed Answered

Interrupts are not occurring in order

Question asked by Manjunatha S on Apr 3, 2013
Latest reply on Apr 5, 2013 by malund.erik
Hi! All,
I have a reed switch based Wind Speed and wind direction sensor(anemometer), these two reed switches(one for wind speed and another for direction) are connected to pull ups so that it generates the digital pulse as the switches closes and opens. i configured two interrupts for each reed switches but i should get one interrupt at a time that is one contact closure  at a time and i am getting these in ossciloscope but i am not getting the one interrupt at a time rather i am getting same interrupt at two times. can any one tell me the what is the reason ? and to overcome this.
gpio initialization
void WS_Init_Wind_Sensors_Input()
  GPIO_InitTypeDef gpio_init_structure;
  EXTI_InitTypeDef exti_init ;
  /* Enable GPIO clocks */
  gpio_init_structure.GPIO_Pin  = WIND_SPEED_SENSOR_GPIO_PIN;
  gpio_init_structure.GPIO_Mode = GPIO_Mode_IN;
  gpio_init_structure.GPIO_PuPd = GPIO_PuPd_NOPULL;
  gpio_init_structure.GPIO_Speed = GPIO_Speed_40MHz;
  gpio_init_structure.GPIO_OType = GPIO_OType_PP;
  /* Initialise the GPIO accordingly */
  GPIO_Init(WIND_SPEED_SENSOR_GPIO_PORT, &gpio_init_structure);
  gpio_init_structure.GPIO_Pin  = WIND_DIRECTION_SENSOR_GPIO_PIN;
  /* Initialise the GPIO accordingly */
  GPIO_Init(WIND_DIRECTION_SENSOR_GPIO_PORT, &gpio_init_structure);
  /* The syscfg module is clocked */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
  /* The EXTI mux is on exti line RG_EXTI_PINSOURCE for this GPIO pin */
  /* The EXTI mux is on exti line RG_EXTI_PINSOURCE for this GPIO pin */
  exti_init.EXTI_LineCmd = ENABLE;
  exti_init.EXTI_Trigger = EXTI_Trigger_Falling;
   /*Enable the interrupt in the NVIC */
  exti_init.EXTI_Trigger = EXTI_Trigger_Rising;
  /*Enable the interrupt in the NVIC */
//interrupt handler
void EXTI9_5_IRQHandler(void)
    if( (EXTI_GetITStatus(EXTI_Line9) == SET ))
   USART_Send_String("TD>>>>>>>>>\r\n ");
    if((EXTI_GetITStatus(EXTI_Line6) == SET ))
        USART_Send_String("TS!!!!!!!!!!!!!!!!!\r\n ");

Tanking you.