Interrupt not triggered on EXTI1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-04 12:47 AM
actually I'm using stm32F446RE, I'm using hal library just to detect external interrupt from PA1 pin but it doesn't work, and if I put the interrupt from PA0 pin, it works fine?
/* USER CODE BEGIN 0 */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
count++;
}
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_TIM1_Init();
while (1)
{
}
}
void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOH_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
/*Configure GPIO pin : PA1 */
GPIO_InitStruct.Pin = GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* EXTI interrupt init*/
HAL_NVIC_SetPriority(EXTI1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(EXTI1_IRQn);
}
Solved! Go to Solution.
- Labels:
-
GPIO-EXTI
-
Interrupt
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-04 1:54 AM
thx for your answers @Sarra.S​ @Community member​ , i just replaced the stm card and it works
the pb that the pin PA1 is burnt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-04 1:26 AM
Hello @kkhli.1​,
Check that the EXTI1_IRQ interrupt is not being masked by other interrupts with higher priorities
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-04 1:30 AM - edited ‎2023-11-20 6:30 AM
hello ,i'm using only one interrupt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-04 1:38 AM
Make sure you have connection from physical PA1 pin to the point you think the signal is. Observe input in GPIOA_IDR, or set PA1 as output and toggle.
Read out and check EXTI and relevant GPIO and SYSCFG registers content.
Other than that, follow the usual "interrupt does not fire" checklist.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-04 1:54 AM
thx for your answers @Sarra.S​ @Community member​ , i just replaced the stm card and it works
the pb that the pin PA1 is burnt
