2020-02-03 03:26 AM
How to handle multiple External (more than 2 )interrupts on same port (eg Port A) of STM32. my code is below , I wants to know that how can I Differentiate External interrupt 0 And 1. I have configured pushbutton1 on PA0, Pushbutton2 on PA1, pushbutton3 for PA2 and pushbutton4 For PA3 of Rising Edge. I have Given Same Priority to all interrupts. Thanks In Advanced.
void EXTI0_1_IRQHandler(void)
{
/* USER CODE BEGIN EXTI0_1_IRQn 0 */
/* USER CODE END EXTI0_1_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0);
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_1);
/* USER CODE BEGIN EXTI0_1_IRQn 1 */
/* USER CODE END EXTI0_1_IRQn 1 */
}
void EXTI2_3_IRQHandler(void)
{
/* USER CODE BEGIN EXTI2_3_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_2);
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_3);
/* USER CODE END EXTI2_3_IRQn 0 */
/* USER CODE BEGIN EXTI2_3_IRQn 1 */
/* USER CODE END EXTI2_3_IRQn 1 */
}
2020-02-09 07:25 PM
thank you Got Expected results.