Question
stereo recording with 2 MEMS mics... Capturing both channels
Posted on January 19, 2016 at 09:16
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 */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2,ENABLE); /* SPI configuration */ SPI_I2S_DeInit(SPI2); 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_I2SCLKConfig(RCC_I2S2CLKSource_PLLI2S); RCC_PLLI2SCmd(ENABLE);//con questo da solo va con rumore while (RCC_GetFlagStatus(RCC_FLAG_PLLI2SRDY) == RESET); /* Enable the Rx buffer not empty interrupt */ SPI_I2S_ITConfig(SPI2, SPI_I2S_IT_RXNE, ENABLE); } Any suggestions? Thank you very much! #stm32f4-mems-stereo-rec-pdm-i2s