ESP32 DMA & i2s two channels reading

I am looking for a way to read two analog signals simultaneously using ESP32 DMA & i2s. My project need sample rate as fast as possible. It is a digital scope. The analogRead speed is not enough. Using DMA and i2s for only one channel is perfect but I need two simultaneously channels. I am studing the configuration for stereo audio signals. It seams to be something like I am looking for but the chinese docs are pour and I am not sure about that... Does anybody have same acknowledgment about reading stereo sound audio signal that would be applied to two ADC ESP32 pins ? Thanks a lot.

typical audio sampling rates are 44 and 48 k samples/sec and 16 bits.

you need a DSP and ADCs capable of those rates along with whatever capability is required to do something with the samples

You could use an external stereo Codec with an I2S interface. PJRC uses an SGTL5000 on their Teensy Audio Board.

Analog reading with i2s? Doesn't i2s transfer digital data?

Yes it does ! The parameter I2S_MODE_ADC_BUILT_IN in i2s mode configuration means that input data will come from ESP32 ADC pin

My target is read two analog signals directly from ESP 32 ADC GPIO pins, using the i2s and DMA features present on ESP32... But thanks anyway

Having a target doesn't necessarily make it achievable. What's your Plan B?

I do not have plan B... I intend to insist a little bit more on plan A... I think the ESP32 is really a great processor but the Espressif must be prosecuted due to their absolutely pour docs !!!

1 Like

Good luck with that.

Head Banging Against Wall Emoticon GIFs | Tenor

I have explored Arduino Forum, Espressif Forum, Google, ChatGPT, and available docs to get an acceptable picture of the memory structure of the ESP32 System that holds LX6 dual-core, embedded RAM (I am not sure), embedded ROM, off-chip RAM (I am not sure), embedded cache (I am not sure), off-chip flash and the over-all result is unsatisfactory!! I am still searching for it as I have to prepare a Lecture Note for my undergraduate pupils. Up to now, I have the following information:

Each Core is equipped with: 64 KB IRAM, 8KB I-Cache, 128 KB DRAM, 8KB D-Cache.

Embedded 440 KB Mask ROM, 520 KB RAM (embedded or off-chip?), embedded 8 KB RTC Fast Memory, embedded 8 KB RTC Slow Memory, and off-chip 4 MB Serial Flash Memory.

At this link: adc i2s mode with multiple channel pattern (IDFGH-803) by phonec · Pull Request #1991 · espressif/esp-idf · GitHub there is examples about how to read until 8 channels simultaneously using i2s & DMA under ESP32... I did not have success with them until now but I am working on them...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.