Hello @HMSEdinburge ,
First, I have remarks regarding the info you provided:
@HMSEdinburge wrote:
enabled NVIC interrupt, GPIO pull-up, interrupt with rising edge triggered,
-> You set pull up and you set the EXTI edge to rising which is not correct. You need either to set pull-up resistor and set the edge to falling or set pull-down resistor and set the edge to rising.
@HMSEdinburge wrote:
Hello, I'm using H723 Nucleo. I set 5 ext interrupt pins: PA0, PA1, PA4, PC2_C, and PC13
PA1 is connected to the ETH PHY RMII_REF_CLK pin on the board. need to select another pin. PC13 is used by the user button which has already an external pull-down resistor. So no need to set pull up/down internal resistor.
Now regarding the code, this is how it could be managed:
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
switch(GPIO_Pin)
{
case GPIO_PIN_0: exti_source = 1; break; // PA0
case GPIO_PIN_3: exti_source = 2; break; // PA3 instead of PA1
case GPIO_PIN_4: exti_source = 3; break; // PA4
case GPIO_PIN_2: exti_source = 4; break; // PC2_C
case GPIO_PIN_13: exti_source = 5; break; // PC13
default: exti_source= 0; break;
}
}
I've attached a project running on NUCLEO-H723 that uses all these EXTIs (just replaced PA1 by PA3) . Put exti_source in live watch and you can see the value that changes according to the EXTI event triggered.
Hope that answers your question.
To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.