2024-01-01 06:10 AM - edited 2024-01-01 06:21 AM
Dear SIR,
What is the max number of external inputs using interrupt at the same time?
In my application, it uses 22 GPIO as external input as Fig.1.
1. I use STM32CubeMx to set "PB1" to "GPIO_EXT1" then set "PC1" to "GPIO_EXT1", after setting "PC1", the "PB1" change to unassigned state? it seems not allowed to set PinX1 at the same time? (see Fig.0)
I want to hook an interrupt for each external input, but it seems not workable after I see the document and code
see Fig.2, Fig.3 and Fig.4
2. The max external input using interrupt is 16, is my understanding correct?
3. If it supports more than 16 external input pins, how to set it in STM32CubeMx?
Fig. 0
Fig.1
Fig.2
Fig.3
Fig.4
Solved! Go to Solution.
2024-01-01 06:33 AM
The max is 16, but for any given pin number, only one port can be active. So PB1 and PC1 can't be an interrupt at the same time. This is due to a hardware limitation as shown in the "EXTI GPIO mux" figure you posted.
2024-01-01 06:33 AM
The max is 16, but for any given pin number, only one port can be active. So PB1 and PC1 can't be an interrupt at the same time. This is due to a hardware limitation as shown in the "EXTI GPIO mux" figure you posted.
2024-01-01 09:42 AM
And for detail at same time only one IRQ is active based on priority.
EXTI is limited to 16 , but when your reaction time isnt critical you can extend it pool gpio in timer interrupts,
Or with some config you can use timer channels input as exti int.
2024-01-01 10:02 AM
Would suggest combining signals externally or using an io expander
TIM Input Capture pins
Scan in SysTick