Anonymous
Not applicable
Dec 20, 2015
11:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 20, 2015
11:57 PM
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?
1 Reply
Dec 21, 2015
12:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 21, 2015
12:26 AM
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.