2017-11-09 02:55 AM
Hi friend.
I try create program working with external interrupt. And I have a problem. Interrupt never work....
int8_t InitPin(void)
{LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOD);
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SYSCFG); LL_GPIO_SetPinMode(GPIOD, LL_GPIO_PIN_4, LL_GPIO_MODE_INPUT); LL_GPIO_SetPinPull(GPIOD, LL_GPIO_PIN_4, LL_GPIO_PULL_UP);NVIC_EnableIRQ(EXTI4_IRQn);
SYSCFG->EXTICR[1] &= SYSCFG_EXTICR2_EXTI4_PD;
LL_EXTI_EnableFallingTrig_0_31(LL_EXTI_LINE_4);
LL_EXTI_EnableIT_0_31(LL_EXTI_LINE_4);NVIC_SetPriority(EXTI4_IRQn,0);
NVIC_ClearPendingIRQ(EXTI4_IRQn); NVIC_EnableIRQ(EXTI4_IRQn);/* LED out PIN */
LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOD); LL_GPIO_SetPinMode(GPIOD,LL_GPIO_PIN_14,LL_GPIO_MODE_OUTPUT);return 0;
}void EXTI4_IRQHandler (void)
{ LL_GPIO_TogglePin(GPIOD,LL_GPIO_PIN_14);//LL_EXTI_ClearFlag_0_31(LL_EXTI_LINE_4);
NVIC_ClearPendingIRQ(EXTI4_IRQn);}
Any idea, what is wrong??? Thank you
#stm32f407 #external-interrupt #ll-drivers2017-11-09 03:30 AM
https://community.st.com/0D70X000006SvjISAS
?JW