Question
external interrupt is not generating on PB0 pin
Posted on September 16, 2016 at 20:17
hi,
i m trying to set the external interrupt for PB0 pin on rising or falling edge. i configured but it is not working properly.here is configuration i gave[CODE]&sharpdefine NVIC_PRIORITY_MASK(prio) ((prio) << (8U - (unsigned)__NVIC_PRIO_BITS))void set_exti(void){ RCC->APB2ENR |= 0x00000001; SYSCFG->EXTICR[0] = 0x00000001; EXTI->RTSR = 0x00000001; nvicEnableVector(EXTI0_IRQn,0); NVIC_EnableIRQ(EXTI0_IRQn);}void nvicEnableVector(uint32_t n, uint32_t prio) { NVIC->IP[n] = NVIC_PRIORITY_MASK(prio); NVIC->ICPR[n >> 5U] = 1U << (n & 0x1FU); NVIC->ISER[n >> 5U] = 1U << (n & 0x1FU);}[/CODE]i am changing the voltage level on pin then also it is not extecuting isr_routine.please help me with generating external interrupt. #nucleo #stm32 #exti #eclipse