I just saw that toggling the GPIO0 takes around 3.28us. Could someone tell me why? The CPU frequency is 80MHz right? This would give a clock cycle of 12.5ns.
I tried this on an ESP-14 with the BasicOTA.ino running in background but that should not bother it too much.
pinMode(0, OUTPUT);
digitalWrite(0, HIGH);
digitalWrite(0, LOW);
digitalWrite(0, HIGH);
digitalWrite(0, LOW);
digitalWrite(0, HIGH);
digitalWrite(0, LOW);
UPDATE: Ok, for some reason with the same code now I get 420ns for a pin toggle. This is still far to slow. Wifi and OTA is turned off, basically I use an empty sketch now.
Please someone help me.