This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

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.