This gives a pulse as expected, but the time between pulses is 2.2 uS. I can only guess Arduino is doing background stuff, but it is eating up about 180 clock cycles.
I see similar times, and I don't understand it either
Ah. This appears to be due to the SerialEventRun() polling crap in main() Due has 4 serial ports, so that's minimally 4 calls to SerialX.available() I was under the impression that the compile was smart enough to omit that when there were no serial ports in use, but I guess not
Removing the SerialEventRun() call reduces the interval to about 400ns (~33 cycles.) That still seems a bit longer than I'd hope (the instruction sequence looks "ok"), but it's a lot better.