Jitter in a square wave generated by using GPIO.

Could anybody please show me if ARM could generate a square wave without jitter by using GPIO?

If it could, how?
If it could not, why? Cache or interruption makes it?
Please show me.

My code is as below.

tag:
    gpio_on(4);
    asm("nop");
    gpio_off(4);
    goto tag;

And, this code generates a square wave of 1.5MHz. Why so slow?

Thank you.

More questions in this forum