ESP8226 pin toggling takes some time
Posted: Thu Oct 06, 2016 3:50 am
Dear all,
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.
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.
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.
Code: Select all
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.