cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt not triggered on EXTI1

kkhli.1
Associate III

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

}

1 ACCEPTED SOLUTION

Accepted Solutions
kkhli.1
Associate III

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

View solution in original post

4 REPLIES 4
Sarra.S
ST Employee

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
Associate III

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

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
Associate III

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