2017-07-23 04:02 AM
I use STM32F103C3
void EXTI9_5_IRQHandler(void)
{ /* USER CODE BEGIN EXTI9_5_IRQn 0 */ while(1){ HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_10); HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_11);HAL_Delay(1000);
}
/* USER CODE END EXTI9_5_IRQn 0 */ HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_6); /* USER CODE BEGIN EXTI9_5_IRQn 1 *//* USER CODE END EXTI9_5_IRQn 1 */
}that is not recycle,
I use interrupt, so toggle mode just one, not anymore working....
2017-07-23 01:20 PM
Hello !
1. The 'while(1)' is fatal for your handler
2. Use this before your loop.
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin);
Be aware also with HAL_Delay(1000); inside your handler.
What do you want to do?
2017-07-23 08:38 PM
Thank you answer my question
This problem is delay priority high then EXTI , so stuck function
you know, how to setting priority timer and EXTI ?
2017-07-24 03:01 AM
hi!
Take a look ffirst inside HAL_Init() function to see the Interrupt Group Priority
You can call to set your priority.
HAL_NVIC_SetPriority(SysTick_IRQn, X, Y);
HAL_NVIC_SetPriority(EXTI9_5_IRQn, X, Y);
If 'Delay priority ' is lower than Exti priority then delay will stuck.
2017-07-24 08:25 PM
Oh Thank you, my problem solve