GPIO sampling speed?
Posted: Mon Feb 02, 2015 5:37 pm
I am sampling the GPIO pin to monitor the data on a external line. The line is driven at around 1 Mhz.
Given that the ESP runs at 80 Mhz, one would think that there is plenty of room for collecting all that passes through it.
However, after some testing with very limited tools, it seems that the GPIO sampling is incapable of being faster than a few Khz. Can someone else test this on their side?
You could use a square signal generator, feed it into, say, GPIO4 and run something like this in your preferred terminal application (I used LuaLoader):
Given that the ESP runs at 80 Mhz, one would think that there is plenty of room for collecting all that passes through it.
However, after some testing with very limited tools, it seems that the GPIO sampling is incapable of being faster than a few Khz. Can someone else test this on their side?
You could use a square signal generator, feed it into, say, GPIO4 and run something like this in your preferred terminal application (I used LuaLoader):
Code: Select all
gpio.mode(4, gpio.INPUT, 0)
for loops = 1,10 do
memory = loops
tmr.wdclr()
for count = 1,1024 do
memory = memory .. gpio.read(4)
end
print(memory)
end
print("Done.")