External interrupt Handler does not execute
Hi, I'm trying to execute an interrupt with the pin PCO with stm32f303re Nucleo board, but the interrupt routine never executes, actually, it just stops the program. this is my configuration code for the interrupt:
//set gpioc 0 as interrupt
__disable_irq();
SYSCFG->EXTICR[0] |= 0x2;
EXTI->IMR |= (1 << 0);
EXTI->RTSR &= ~(1 << 0); //configure pin 0 as interrupt, fall edge
EXTI->FTSR |= (1 << 0);
NVIC_EnableIRQ(EXTI0_IRQn);
NVIC_SetPriority(EXTI0_IRQn, 0);
__enable_irq(); and this is my Interrupt routine:
void EXTI0_IRQHandler(void) {
counter2++;
EXTI->PR |= EXTI_PR_PR0;
}and in the debug view i can see that the processor triggers the interrupt, but it just stuck the program and the interrupt is never executed:
before pressing the button connected to PC0:
after pressing the button:
Thanks for any help.