How can I distinguish which pin generate the interrupt if both of the tow pins share the same interrupt source

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

cross mob
Dave_Long
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

Hi all:

     As the follow picture:

pastedImage_0.png

     

   How can I distinguish which pin generate the interrupt if both of the tow pins share the same interrupt source?

0 Likes
1 Solution
Yeshwanth_KT
Employee
Employee
50 replies posted 25 replies posted 10 likes received

Hello,

You can go through this example CE: http://www.cypress.com/documentation/code-examples/ce210558-psoc-4-gpio-interrupt.

In your case "FAULT_ClearInterrupt()" should clear the interrupt flag and return the right-shifted current value of the interrupt status register. The bit location that is "1" int the returned value indicated the pin which caused the interrupt. Please go through the example code for more details.

Thanks,

Yeshwanth

View solution in original post

1 Reply
Yeshwanth_KT
Employee
Employee
50 replies posted 25 replies posted 10 likes received

Hello,

You can go through this example CE: http://www.cypress.com/documentation/code-examples/ce210558-psoc-4-gpio-interrupt.

In your case "FAULT_ClearInterrupt()" should clear the interrupt flag and return the right-shifted current value of the interrupt status register. The bit location that is "1" int the returned value indicated the pin which caused the interrupt. Please go through the example code for more details.

Thanks,

Yeshwanth