title: how do I fix an interrupt that fires multiple times on EXTI9-5?
body: <p>I'm working on an STM32F303CC. on this mcu I'm using 6 buttons as interrupts. 5 of these buttons are connected to EXTI15-10 and one to EXTI9-5. the buttons on EXTI15-10 are working perfectly fine. although, when I press the button on EXTI9-5 it fires an incredible amount of times (randomly somewhere between 1500 to 4000 times or so).</p>
  <p>it clears the flag, and when there's a breakpoint added to the interrupt function it only fires one time.</p>
  <p>I've tried to see if it was a hardware bounce, but there is no bouncing, as checked with an oscilloscope. also it has this problem with both falling and rising edge trigger detection.</p>
  <p>I expect to fire the interrupt just one time after a press, instead, it fires a very high amount of times.</p>
  <p>what could be the problem?</p>
  <p>thanks in advance,
  Ruben</p>
  <p>GPIO config:</p>
  <pre><code>  /*Configure GPIO pins : BUTTON_6_Pin BUTTON_5_Pin BUTTON_4_Pin BUTTON_3_Pin 
                         BUTTON_2_Pin BUTTON_1_Pin BUTTON_7_Pin */
    GPIO_InitStruct.Pin = BUTTON_6_Pin|BUTTON_5_Pin|BUTTON_4_Pin|BUTTON_3_Pin 
                            |BUTTON_2_Pin|BUTTON_1_Pin|BUTTON_7_Pin;
    GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
    GPIO_InitStruct.Pull = GPIO_PULLUP;
    HAL_GPIO_Init(GPIOB, &amp;GPIO_InitStruct);
  </code></pre>
  <p>HANDLER1:</p>
  <pre><code>void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin)
  {
    /* EXTI line interrupt detected */
    if(__HAL_GPIO_EXTI_GET_IT(GPIO_Pin) != RESET)
    {
      __HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin);
      HAL_GPIO_EXTI_Callback(GPIO_Pin);
    }
  }
  </code></pre>
  <p>HANDLERS2:</p>
  <pre><code>    void EXTI9_5_IRQHandler(void)
          {
            /* USER CODE BE
  
  GIN EXTI9_5_IRQn 0 */
      
        /* USER CODE END EXTI9_5_IRQn 0 */
        HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8);
        /* USER CODE BEGIN EXTI9_5_IRQn 1 */
      
        /* USER CODE END EXTI9_5_IRQn 1 */
      }
      
      /**
        * @brief This function handles EXTI line[15:10] interrupts.
        */
      void EXTI15_10_IRQHandler(void)
      {
        /* USER CODE BEGIN EXTI15_10_IRQn 0 */
      
        /* USER CODE END EXTI15_10_IRQn 0 */
        HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_10);
        HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_11);
        HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_12);
        HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_13);
        HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_14);
        HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_15);
        /* USER CODE BEGIN EXTI15_10_IRQn 1 */
      
        /* USER CODE END EXTI15_10_IRQn 1 */
      }
  </code></pre>