2013-03-21 11:44 AM
I have an application where I have a digital mic/codec (maxim codec chip) combination transmitting PCM 16-bit samples over I2S to an STM32F217. I am trying to use DMA to capture this audio stream, however I only wish to capture one single channel on I2S. I am using mono mode.
I am using 16bit data mode, 8KHz sample rate..
STM32 I2S configured for PCM mode.Is there a way to configure the I2S DMA mono capture instead of stereo capture?
Is that I need to configure I2S interface for receiving only one channel data (Right channel or left channel), ignoring other channel?
#stm32-i2s-codec-audio-capture #stm32-i2s-codec-audio-capture2013-03-21 02:04 PM
If it's in PCM mode it should just grab a stream of data, if you are clocking 32-bits across the interface, you're going to receive 32-bits, and you'll need to step over the data you don't want. If you just have 16-bits, you'll get that.
What do you have it capturing now? Review that.2013-03-22 12:18 PM
Thanks for the reply.
I am using a codec chip which connected to MIC. I am using only right MIC and there is no MIC at left channel. As per Codec chip, it sends 32 bits of data, where <0 - 15> bits will be left channel data, <16-31> bits will be containing right channel data. With STM32 MCU, I need to ignore first 16 bits, which is noise of left channel, and should capture only <16-31> bits, which is the valid data.I am using I2S DMA for capturing data.How to configure I2S for above mentioned scenario?2013-03-22 01:04 PM
I'm not invested in your development, and I don't see a spec cited for the codec or mic devices.
Worst case, you'll need to configure it in a 32-bit PCM mode, and then discard every other 16-bit word in software. I'm not sure the STM32 hardware is capable of decimating the unused channel for you, if it were my problem I'd experiment.