How to detect a cause of interrupt on GPIO (rise or fall) ?
Posted: Sat Jun 25, 2022 11:14 am
Hi there!
I work with ESP 32 (ESP-IDF) and try to detect a cause of interrupt - rising or falling edge. I know some ways to accomplish. So:
1. Use one GPIO configured as an interrupt emitter (rise and fall), after it we need to measure a voltage on GPIO (of course by ADC) - is not bad method, but needs some CPU time;
2. Use two GPIO pin tied each other by external jumper. These GPIO (configured with interrupt) have individual interrupt handlers - one for rising edge, other for falling. This way is more quickly, but needs 1 additional GPIO.
Is there a way use one GPIO to separate the cause of interrupt?
Best wishes:)
I work with ESP 32 (ESP-IDF) and try to detect a cause of interrupt - rising or falling edge. I know some ways to accomplish. So:
1. Use one GPIO configured as an interrupt emitter (rise and fall), after it we need to measure a voltage on GPIO (of course by ADC) - is not bad method, but needs some CPU time;
2. Use two GPIO pin tied each other by external jumper. These GPIO (configured with interrupt) have individual interrupt handlers - one for rising edge, other for falling. This way is more quickly, but needs 1 additional GPIO.
Is there a way use one GPIO to separate the cause of interrupt?
Best wishes:)