Skip to main content
kkhli.1
Associate III
May 4, 2023
Solved

Interrupt not triggered on EXTI1

  • May 4, 2023
  • 4 replies
  • 1568 views

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);

}

This topic has been closed for replies.
Best answer by kkhli.1

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

4 replies

ST Employee
May 4, 2023

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.
kkhli.1
kkhli.1Author
Associate III
May 4, 2023

hello ,i'm using only one interrupt
_legacyfs_online_stmicro_images_0693W00000bjMqqQAE.png

waclawek.jan
Super User
May 4, 2023

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

kkhli.1
kkhli.1AuthorBest answer
Associate III
May 4, 2023

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