Page 1 of 1

Simple sample code for GPIO capture using I2S?

Posted: Thu Jun 29, 2023 9:19 pm
by OSCPUDEV
I am looking for some sample code that will simply capture the state of a GPIO pin and build the bitstream in the DMA buffer.

I need to capture at 40MHz (25ns intervals). Everything i have seen deals with audio data, and I need to make just a very simple single channel logic analyzer with 2 buffers so that a continuous stream can be stored in PSRAM (using ping-pong buffers).

Thanks!

Re: Simple sample code for GPIO capture using I2S?

Posted: Tue Jul 04, 2023 3:58 pm
by ok-home
Hi
This is a bit different from what you want.
Parallel capture at 40 megahertz
but if you wish, you can correct it for serial as far as I understand

https://esp32.com/viewtopic.php?f=17&t=33876

Re: Simple sample code for GPIO capture using I2S?

Posted: Thu Jul 06, 2023 10:13 pm
by OSCPUDEV
Thanks for pointing this out!

Does this use I2S for the capture? I don't need 16 channels.. I need just 1 channel, but I do need to capture 300,000 samples and store them in PSRAM.