I'm trying to connect SPH0641LU4H-1 microphone to STM32F411RE Nucleo board.
According to the Wikipedia PDM format should represent lowest and highest amplitude as 0b0000...(all 0) and 0b1111...(all 1) accordingly.
When I connect microphone pin to the ground -> 0b0000... PDM data is transferred to PDM_Filter_XX_XX and output sound is silence. But when I connect it to 3.3v source to emulate PDM 0b1111... -> the output I get is 1KHz noise. (16bit@16KHz PCM). PDM_Filter_128_LSB function outputs big(depends on micGain) int16_t values with + or - sign.
But I expect that 0b0000... and 0b1111... represents maximum and minimum diffuser deflection. Am I wrong?
In general, I receive strange binary from PDM_Filter which doest'n looks like a wave and sounds like very noisy 1KHz square wave oscillator.
Some ideas where I went wrong? I can provide details for every step I did.
I2S: MasterClock: ON
PDM_Buffer size: 128 * uint16_t
PCM_Buffer size: 16 * uint16_t