Re: External pulse edge detecction
I haven't used it yet but I suppose "interrupt on change" would be what you'd want to use.
However i'm concerned about the random triggers, have you looked at the input signal?
Maybe it's not a clean signal (similar to a debounce problem) or the voltage thresholds aren't correct.
Have you taken a look at the input signal with an oscilloscope?
MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS Mojave (10.14.6) and MPLAB X IDE v5.30
Curiosity PIC32MZ EF 1 & 2, PIC24F Curiosity, XPRESS EVAL BOARD (PIC16F18855), SAMA5D3 Xplained and various custom boards.