cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4

Dave_Long
New Contributor II

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

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

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