I2S in PDM Mode? <SOLVED>

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

I2S in PDM Mode? <SOLVED>

Postby fly135 » Wed Jul 25, 2018 11:53 pm

I've previously used a PDM mic and it was working fine. We put a different PDM mic on the board and now I can't seem to get any useful data. The previous mic didn't have a bits/sample in the spec but the new PDM mic says that it's 24bits with 18bits precision (i.e. remaining bits are zero). So my question is should I set the I2S sample size to 16bits or 32bits?

The reason I ask is because in the technical reference manual section on PDM it says this....
The bit width for both received and transmitted I2S PCM signals is 16 bits.
Does the ESP32 auto-magically handle this? Or is the new mic not suitable because it's more than 16 bit?

John A
Last edited by fly135 on Thu Jul 26, 2018 4:29 pm, edited 1 time in total.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: I2S in PDM Mode?

Postby fly135 » Thu Jul 26, 2018 4:27 pm

Figured out my problem. I forgot to switch the clock from BCLK to WS.

In my code I capture 16bps.


edit: I should mention in the initial post the PDM mic I previously used was on a different revision of the board. The current revision had a PCM mic and they just swapped it for the new PDM mic. So there were some mix ups caused by the pin names on the layout.

John A

Who is online

Users browsing this forum: Majestic-12 [Bot] and 95 guests