cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

In my application,I set one IO pin both edges interrupt. in interrupt service function, how can I know whether the interrupt is raising interrupt or falling interrupt?

   

Or can I connect my signal to two pins, one for raising detection, the other for falling detection?

0 Likes
1 Reply
HeLi_263931
Honored Contributor II

In the ISR you can check the current state of the pin, which gives you the type of the edge (provided its not a fast signal).

   

You could also detect your signal to two IO-pins, and then have two ISRs. Or you connect it to one pins, and add two edge detector components (http://www.cypress.com/documentation/component-datasheets/edge-detector ) to this pin.

0 Likes