Microphones streaming through I2S
Hi,
I'm trying to implement the streaming of two MEMS microphones via I2S.
Following some examples provided by ST, I was able to implement the acquisition of the two microphones: I obtain a 32 samples buffer PCM every 1 ms (left and right channel).
Now I'm trying to send these samples through I2S (16 Bits Data on 16 Bits Frame, 16 KHz) using DMA in circular mode. So, I can fill the buffer while the transmission goes on.
I've created a 128-elements buffer. Every 1 ms I put in the buffer 32 elements. When the buffer contains 64 elements, I launch the transfer using "HAL_I2S_Transmit_DMA".
The problem is that probably the DMA transfer goes slowly compared to the 1 ms filling routine, so what I obtain is that the sound isn't clear.
How can I sync these two operations?
