EXTI0 double interrupt on one edge
I developed a 62.5kbit synchronous self-clocked (similar to SDLC) communication firmware for STM32F412, to be interfaced with an old device via RS485.
It works in "bitbanging" using a 16us interrupt timer (TIM11) to sample the bits and EXTI0 (PB0) interrupt on both rising and falling edges to synchronize the timer for a center of bits data sampling.
There is a problem with EXTI0 interrupt, because few times I have two interrupts intead of one, in one of the front.
With an oscilloscope I've seen that there are no spikes or glitches on PB0 and the signal edges are right.
My EXTI0 interrupt code duration is less than 3us and TIM11 interrupt code duration is less than 4us.
EXTIO interrupt has priority of 0,0 and TIM11 interrupt has priority of 0,1
This is my simple EXTI0 interrupt code:
void EXTI0_IRQHandler(void)
{
/* USER CODE BEGIN EXTI0_IRQn 0 */
...my code...
/* USER CODE END EXTI0_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0);
/* USER CODE BEGIN EXTI0_IRQn 1 */
/* USER CODE END EXTI0_IRQn 1 */
}
What can be the issue and how can it be solved?
Thanks ad best regards
G
