STM32 Discovery kit Microphone data reading using DFDSM peripheral (Doubts and problems)
Hi all, i decided to write a simple program on my stm32 board (B-L475E-IOT01A), here are some of the setting of my peripheral:
i read input data from channel 2 sampling data on rising edge
The clock frequency at which the microphone is outputting PDM bits is 80 Mhz (by clock tree) divided by 40 using the internal prescaler

for the filtering on pdm signal i choose (by using the table) sinc3 with FOSR = 32, so that my output data is represented on a 16 bit signed integer.

the dma mode is circular and i use one bufffer for dma and the other buffer for pcm samples, the samples are mono so the audio buffer contains only one channel samples
here is a snippet of my code, i didnt include half buffer and full buffer callbacks, they just update the associated flags.

The problem with this program is that, the audio buf data is always negative (which i suppose is wrong because we are talking about some pcm waveform). What am i doing wrong?

