AnsweredAssumed Answered

stereo recording with 2 MEMS mics... Capturing both channels

Question asked by daddi.matteo on Jan 19, 2016
Latest reply on May 5, 2017 by Mohamed Jallouli
Hello everyone,
I have a STM32F4-Discovery board with an integrated MP45DT02 MEMS mic, and I've bought also anothere mic (an MP34DT01), I would like to record at the same time from the 2 mics.

By now I've captured audio from the integrated mic, and simulated the other mic with a RAM-stored pdm bitstream... Now I want to capture audio from the 2 mics at the same time... To do so I've to capture a bit both on the rising, both on the falling edge of the clock fed to the mics, but I don't know how to do... Up to now I've captured bits from the integrated mic just on one edge using the I2S...

This is my I2S configuration:

static void WaveRecorder_SPI_Init(uint32_t Freq)
  I2S_InitTypeDef I2S_InitStructure;

  /* Enable the SPI clock */

  /* SPI configuration */
  I2S_InitStructure.I2S_AudioFreq = 32000;
  I2S_InitStructure.I2S_Standard = I2S_Standard_LSB;
  I2S_InitStructure.I2S_DataFormat = I2S_DataFormat_16b;
  I2S_InitStructure.I2S_CPOL = I2S_CPOL_High;
  I2S_InitStructure.I2S_Mode = I2S_Mode_MasterRx;
  I2S_InitStructure.I2S_MCLKOutput = I2S_MCLKOutput_Disable;
  /* Initialize the I2S peripheral with the structure above */
  I2S_Init(SPI2, &I2S_InitStructure);

  RCC_PLLI2SCmd(ENABLE);//con questo da solo va con rumore
  while (RCC_GetFlagStatus(RCC_FLAG_PLLI2SRDY) == RESET);

  /* Enable the Rx buffer not empty interrupt */

Any suggestions?

Thank you very much!