INMP441 producing data in the wrong channel

By alaam666 , 5 February 2018

Hi,

I’m working on the microphone INMP441 on mono-output mode. I see in the datasheet that if the L/R PIN (4) is on low then the left channel is activated, and otherwise the right channel. In my case it’s on low so I expect to have values only in the left channel, which according to the datasheet is in the first 32 bits of every 64-bit sample. Problem is looks like this is not consistent. For example here’s a snapshot from a buffer I get after DMA sampling:

uint16_t data[1024];

data[0]: 23296
data[1]: 0
data[2]: 0
data[3]: 13
data[4]: 13824
data[5]: 0
data[6]: 0
data[7]: 12
data[8]: 62208
data[9]: 0
data[10]: 0

I would expect to have relevant data in the entries (0,1), (4,5), (8,9). But looks like there’s a shift or something in the data (for example I see non-zero values in data[3], which shouldn’t be the case).

When I set the L/R pin to high, sometimes I get:
data[0]: 0
data[1]: 65521
data[2]: 61184
data[3]: 0
data[4]: 0
data[5]: 65524
data[6]: 1536
data[7]: 0
data[8]: 0
data[9]: 65523
data[10]: 15360
data[11]: 0
data[12]: 0

Expected: (2,3), (6,7), (10,11)

Sometimes I get as expected but on other times I get “shifted” data like above.

I’m sampling with DMA.
Settings:
Peripheral data width: half word , memory data width: half word
Data and frame format: 24 Bits data on 32 Bits frame
Selected audio frequency: 16 KHz

Any help is appreciated.

Thanks

phpbb Topic ID
36730