M5 atom echo, using simultaneously the mic and the speaker, impossible?

ClockToshi
Posts: 8
Joined: Thu Nov 16, 2017 9:09 pm

M5 atom echo, using simultaneously the mic and the speaker, impossible?

Postby ClockToshi » Sun Jun 28, 2020 5:35 pm

The m5 atom echo comes with a PDM mic SPM1423 and speaker NS4168 i2s

From https://docs.espressif.com/projects/esp ... s/i2s.html
Each controller can operate in half-duplex communication mode. Thus, the two controllers can be combined to establish full-duplex communication.

Following the mp3_dac example I managed to get the speaker working.
Looking at some other examples I managed to get the mic working.

If my understand is correct this means we need to use both I2S interfaces if we want both TX and RX at the same time.

I can't seem to get them to work at the same time (separate unpinned tasks) and reading more on the documentation:
I2S0 output can be routed directly to the digital-to-analog converter’s (DAC) output channels (GPIO 25 & GPIO 26) to produce direct analog output without involving any external I2S codecs. I2S0 can also be used for transmitting PDM (Pulse-density modulation) signals.
I believe it is not possible because they both need the I2S_NUM0, the mic because I2S_NUM1 doesn't support PDM while I2S_NUM0 does. And the speaker because it requires the internal I2S DAC mode which can only be rerouted via the I2S_NUM0 and not the I2S_NUM1.

is my understanding of the above correct? Is it possible to use the microphone without PDM maybe?


thank you

Who is online

Users browsing this forum: No registered users and 33 guests