2023-08-31 06:02 PM
Hi, I am using the Nucleo-F767ZI, when I am asigning a function to a pin (PD2) this make unselect the pin PG2, when I reassign the pin PG2 this makes the PD2 is deselected, the same when I try with the PF2, what is wrong? this using the graphic interface to configure automatically
Solved! Go to Solution.
2023-08-31 06:41 PM
For a given pin number, only one port can be selected as the EXTI.
So out of PD2, PG2, and PF2 (and PA2, PB2, etc...), only one can be EXTI at once.
This is a hardware limitation.
2023-08-31 06:07 PM
This happens only when I configure them like as EXTI
2023-08-31 06:41 PM
For a given pin number, only one port can be selected as the EXTI.
So out of PD2, PG2, and PF2 (and PA2, PB2, etc...), only one can be EXTI at once.
This is a hardware limitation.
2023-08-31 07:11 PM
but manually, can I configure it as EXTI? both?
2023-08-31 07:13 PM
the tutorials and manual say I can differenciate them with a "if" checking the status in the port register, that's possible?
2023-08-31 07:32 PM
/*Configure GPIO pins : IN_3_Pin IN_4_Pin */
GPIO_InitStruct.Pin = IN_3_Pin|IN_4_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT; ONLY CHANGE THIS for GPIO_MODE_IT_RISING_FALLING;?
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
2023-08-31 07:36 PM
> but manually, can I configure it as EXTI? both?
No, it's a hardware limitation. No coding can get around that. CubeMX is simply enforcing the limitations of the hardware.
Look at the SYSCFG->EXTICR1 register for the underlying limitation. For pin 2, EXTI2 can only be set to one port at a time.
2023-08-31 07:37 PM
Just for clarity, there is no problem setting PA0, PB1, PC2 all as EXTI at the same time. The limitation is that for a given number, only one pin with that number can be an EXTI.
If you have multiple EXTI you want to trigger, put them on different numbered pins.
2023-08-31 09:49 PM
Understood!!, in fact, I made the code and is working fine, thanks for your explanation, it's my first project with your processors and I am learning yet, but now I advanced with your comments!!