Open PaulAnurag opened 1 year ago
Hi, I encountered the same problem, but with INMP441, and the I2S data in oscilloscope also looked fine. If you are using Arduino IDE, just try to downgrade ESP32-Arduino core to an older (1.0.6 works for me) version in board manager. Hope it helps.
Same issue with a WROOM32. Returns only 1's.
Ah. The Adafruit I2S MEMS Microphone Breakout board uses the right channel. Use I2S_CHANNEL_FMT_ONLY_RIGHT in the config.
For me only I2S_CHANNEL_FMT_RIGHT_LEFT works on the SPH0645. There's also a timing issue which is resolved by:
#include "soc/i2s_reg.h"
void setup() {
...
REG_SET_BIT(I2S_TIMING_REG(i2s_num), BIT(9));
REG_SET_BIT(I2S_CONF_REG(i2s_num), I2S_RX_MSB_SHIFT);
...
For those arriving here, this may be of use to you: https://hackaday.io/project/162059-street-sense/log/160705-new-i2s-microphone
Mic Module : SPH0645LM4H Micro-controller ESP32.
Problem : I get 1 as my output.
Configurations (change in code) :
define SAMPLE_RATE 44100
// most microphones will probably default to left channel but you may need to tie the L/R pin low
define I2S_MIC_CHANNEL I2S_CHANNEL_FMT_ONLY_LEFT
// either wire your microphone to the same pins or change these to match your wiring
define I2S_MIC_SERIAL_CLOCK GPIO_NUM_4
define I2S_MIC_LEFT_RIGHT_CLOCK GPIO_NUM_0
define I2S_MIC_SERIAL_DATA GPIO_NUM_5
I have attached the logic analyzer png wherein data is being seen at the Din Pin of SPH0645Lm4H but the Esp32 is not able to read it.
Please help me if possible. I am stuck with this since 5 days now :(
Thanks Anurag Paul