AnsweredAssumed Answered

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

Question asked by dolezal.ivan on Oct 5, 2014
Latest reply on Oct 10, 2014 by dolezal.ivan
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.

Outcomes