Enable interrupts for multiple pin components on the same port?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I've got a project where I have multiple pins that happen to be assigned to the same port.

   

I'd like to enable interrupts on all these pins. I understand that an interrupt on any pin within a port will be ORed together to a single PICU interrupt. Is it possible to enable interrupts for multiple pins that are assigned to the same port, but that aren't encapsulated in the same "cy_pins" component?

0 Likes
3 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        Probably not. But what prevents you to encapsulate all pins together? Then inside ISR just check which pin caused interrupt as: Mask = myIsr_ClearInterrupt();   
0 Likes
Anonymous
Not applicable

That would work. It just looks confusing on the schematic to route pins from unrelated components to the same Pin block.

0 Likes
        Alternatively, attach standard ISR components to the hardware connector of each individual pin (do not enable ISR on pin). In this case pins don't have to be on same port.   
0 Likes