cancel
Showing results for 
Search instead for 
Did you mean: 

EXTI by STM32Cube setting is not fired (SOLVED - mistake)

Posted on October 05, 2014 at 19:48

I set PC4 as EXTI4 on STM32F405 using STM32Cube so MX_GPIO_Init() contains:

__GPIOC_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_4;
GPIO_InitStruct.Mode = GPIO_MODE_EVT_RISING;
GPIO_InitStruct.Pull = GPIO_PULLUP;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
HAL_NVIC_SetPriority(EXTI4_IRQn, 3, 0);
HAL_NVIC_EnableIRQ(EXTI4_IRQn);

I set breakpoint in stm32f4xx_it.c:

void EXTI4_IRQHandler(void)
{
NVIC_ClearPendingIRQ(EXTI4_IRQn);
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_4);
// My code
}

I have checked a presence of the rising edge on PC4 (INT signal of an accelerometer) by scope but the interrupt is not fired. Does anybody have an opinion or any advice? Thank you.
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Posted on October 10, 2014 at 09:37

My mistake - I have not noticed that the Event not Interrupt selection remained set in the STM32CubeMX for the corresponding pin.