Reading more than 4 i2s channels at once?

beastlyx
Posts: 4
Joined: Fri Nov 25, 2022 12:50 am

Reading more than 4 i2s channels at once?

Postby beastlyx » Sat Sep 09, 2023 3:16 am

I have https://www.seeedstudio.com/Sipeed-6-1- ... -2875.html, and am trying to beamform with the esp32s3. Alas, you really need to read all the 7 microphones at once, and there are only 2 i2s ports on an esp32s3. IE: You can read at most, 4 microphones simultaneously.
I'd prefer not to have to use some kind of multiplexing.
So, I wonder if it's possible to use an i2s port to generate the CLOCK and WS lines correctly, and read back data in SPI octal mode.
IE: Loop back the i2s clock to the SPI input clock, hook the 4 data lines plus word select (so I don't lose my place with the left or right channel) and read data that way?
IE:
[MISO0 = i2s in line 0] [miso1 = i2s in line 1][miso2 = i2s line 2][miso3 = i2s line 3][word select][unused][unused][unused]
Then, each byte I read contains my critical 4 bits of data, plus the fifth bit being word select. Each 32 bytes read, I have 4 channels of 16 bits for the left i2s channel, and 16 bits for the right i2s channel.
It's a wee bit bit bit-bangy, but I can sort the incoming bytes into their proper channels at my leisure; in bursts if need be.
Question is: how do I set up and run the SPI interface in octal mode, (and how do I set up which pins are which?) and just (somehow) leave it to read data, like all the time? (I'm an SPI newb)

ESP_Sprite
Posts: 9761
Joined: Thu Nov 26, 2015 4:08 am

Re: Reading more than 4 i2s channels at once?

Postby ESP_Sprite » Sun Sep 10, 2023 2:23 am

Would probably be easier to see if you can get hardware that can do TDM, iirc that allows you to put up to 32 units on one I2S line.

beastlyx
Posts: 4
Joined: Fri Nov 25, 2022 12:50 am

Re: Reading more than 4 i2s channels at once?

Postby beastlyx » Mon Nov 20, 2023 9:27 pm

Not a bad idea. It's not an esp32 solution, though, AFAIK. (thanks)
So anyone have any ideas how to use Quad SPI mode? Esp in Arduino?

Who is online

Users browsing this forum: No registered users and 37 guests