Raw PDM with more than two microphones

anton_skr
Posts: 2
Joined: Thu Aug 28, 2025 6:08 pm

Raw PDM with more than two microphones

Postby anton_skr » Thu Aug 28, 2025 6:20 pm

Hello,

I am interested in using the raw PDM mode on the I2S peripheral with 6 microphones (3 data lines).
I can get the raw PDM data of one data line (two microphones) using the following configuration:

Code: Select all

i2s_pdm_rx_config_t pdm_rx_cfg = {
	.clk_cfg = {
		.sample_rate_hz = 3072000,
		.clk_src = I2S_CLK_SRC_DEFAULT,
		.mclk_multiple = I2S_MCLK_MULTIPLE_256,
		.dn_sample_mode = I2S_PDM_DSR_8S,
		.bclk_div = 13,
	},
	.slot_cfg = {
		.data_bit_width = I2S_DATA_BIT_WIDTH_16BIT,
		.slot_bit_width = I2S_SLOT_BIT_WIDTH_AUTO,
		.slot_mode = I2S_SLOT_MODE_STEREO,
		.slot_mask = 0b11,
		.data_fmt = I2S_PDM_DATA_FMT_RAW
	},
	.gpio_cfg = {
		.clk = GPIO_NUM_4,
		.dins = {    
			GPIO_NUM_21,
			GPIO_NUM_13,
			GPIO_NUM_14
		},
		.invert_flags = {
			.clk_inv = false,
		},
	},
};

ESP_ERROR_CHECK(i2s_channel_init_pdm_rx_mode(rx_chan, &pdm_rx_cfg));
ESP_ERROR_CHECK(i2s_channel_enable(rx_chan));
However when I try to activate the other two data lines by setting

Code: Select all

.slot_mask = 0b111111
nothing changes, I am still getting data only for the first data line.

Is raw PDM supported with more than one data line? How can I configure it?

Best regards,
Anton

Vvvoid
Posts: 5
Joined: Fri Oct 17, 2025 1:14 am

Re: Raw PDM with more than two microphones

Postby Vvvoid » Fri Oct 17, 2025 8:53 am

why there are 3 gpio in your .din? isnt just two ?

anton_skr
Posts: 2
Joined: Thu Aug 28, 2025 6:08 pm

Re: Raw PDM with more than two microphones

Postby anton_skr » Fri Oct 17, 2025 3:36 pm

I have 6 microphones, so I need 3 data lines. Maybe that's not possible.
But it's ok, I gave up on this and went with a different path.
But thanks for checking.

Vvvoid
Posts: 5
Joined: Fri Oct 17, 2025 1:14 am

Re: Raw PDM with more than two microphones

Postby Vvvoid » Wed Oct 29, 2025 9:05 am

shit it happens to me, I have 8 microphones, but i only get 4 data, the other four data values are constantly unstable.i dont know why...

Who is online

Users browsing this forum: Bytespider and 8 guests