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 High Sierra (10.14.5) and MPLAB X IDE v5.20
Curiosity PIC32MZ EF, PIC24F Curiosity, XPRESS EVAL BOARD (PIC16F18855), SAMA5D3 Xplained and various custom boards.