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.
2023-05-04 01: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
2023-05-04 01: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.
2023-05-04 01:30 AM - edited 2023-11-20 06:30 AM
hello ,i'm using only one interrupt
2023-05-04 01: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
2023-05-04 01: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