I'm using a MK10FN1M0VLQ12.
I have enabled an interrupt on both falling and rising edge of a pin.
Is it possible in the interrupt to see what edge (rising or falling) caused the interrupt?
First I setup a interrupt on falling edge. Then in the interrupt I setup a interrupt when logic one, and so on. That way I cold detect the falling edge and also not miss the rising edge (if the interrupt was too slow to handle the interrupt). :smileyhappy:
Hi
There is only a flag to say that the "event" occurred. You can read the pin's state to see what it is at after the interrupt routine is taken but this will only be sure if the input can't change too fast and multiple edges have occurred.
You could connect two port inputs in parallel, one set to rising edeg and the other to falling edge sensitivity.Then you would be sure which one occurred and whether two occured. Still you won't necessarily be sure that there weren't multiple edges and which one actually occurred first, but this may already be adequate.
Regards
Mark