Can we have 2 GPIO connected to same Interrupt component ?
Yes, you can connect the two pins from the same port to the interrupt component.
In Top design i get to know that we can use either Interrupt component directly to the GPIO pin as digital input to get GPIO interrupt genereted.
Or we can use Global signal & use interrupt to be generated from same port.
So what is difference between Normal interrupt component & Global signal interrupt ?
Which is better use for GPIO interrupt ?
What is preferable use of global signal component ?
All the pin interrupts of a port are OR-ed to produce a single GPIO Port interrupt signal. When the GPIO is routed directly to interrupt, PSoC Creator uses UDB logic to generate interrupt. Hence it is a UDB interrupt. You can confirm by checking the interrupt number after you build the application. A quantity greater than or equal to 122 should be seen. If the number is less than 40, the interrupt is Deep sleep wake-up capable.
I've used CE219521 to note down the observations for both cases of routing Global Reference Signal Component to interrupt and GPIO component to interrupt for more clarity.
Routing interrupt to Global signal reference component
The interrupt is Deep sleep Wake-up capable. The GPIO interrupt logic has additional circuitry to support interrupts on the rising edge, falling edge, and both edges. Here, the interrupt logic generates the signal which is fed to the Interrupt component.
Digital Input -> Interrupt Interrupt-> Interrupt type Status Rising edge Auto-Select Trigger Works Falling edge Auto-Select Trigger Works Both edges Auto-Select Trigger Works
Routing interrupt directly to GPIO
The interrupt is not Deep sleep wake-up capable. When you route GPIO directly, the interrupt is driven directly by signal status at the GPIO. So, interrupt is triggered only for rising edge and level change depending on how the interrupt component is configured.
Digital Input -> Interrupt Interrupt-> Interrupt type Status Rising edge Rising Edge/ Auto-Select Trigger Works Falling edge Level Triggered Works Both edges Level Triggered Works only for falling edge, no response during rising edge Both edges Rising Edge/ Auto-Select Trigger Works only for rising edge, no response during falling edge
For more information, refer to AN 217666. For information on the interrupt numbers refer to Appendix A of the same.