cancel
Showing results for 
Search instead for 
Did you mean: 

Data acquisition from PDM microphones via SAI using DMA - problem with writing to PDM_buffer

RPuch.2
Associate III

I have configured the readout of 4 PDM microphones through the SAI interface. I am using 1 slot of 32 bits per frame.

0693W00000aHesQQAS.png 

I have enabled DMA.

0693W00000aHesVQAS.pngUnfortunately, when reading PDM data, the first 6 and last 2 values of the array are filled with zeros. This happens regardless of the size of the PDM_buffer.

0693W00000aHesaQAC.png 

Do I have something misconfigured? What could be the cause?

Edit: If the PDM_buffer array is of type uint16_t, there are 2x more zeros (12+4 ), and in the case of uint8_t 4x more zeros (24+8).

10 REPLIES 10
RPuch.1
Associate II

OK, I tried different things, I read many articles about similar problems, but I can't deal with it. Is there any relatively simple way to deal with DCache support? Can you show me step by step what I should change and in which files, or what I should add in my program to make DCache work properly?