
Contents AN5027
2/66 AN5027 Rev 2
Contents
1 PDM digital microphones overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1 Sound acquisition overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 PDM digital microphone block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3 Basic digital microphones connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4 PDM and PCM signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.1 Pulse density modulation (PDM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.2 Pulse code modulation (PCM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.3 PDM to PCM conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5 Acoustic parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5.1 Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5.2 Signal-to-noise ratio (SNR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5.3 Acoustic overload point (AOP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5.4 Power supply rejection ratio (PSRR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.6 Added value of digital microphones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.7 Available ST digital microphones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2 Connecting PDM digital microphones to STM32 MCUs and MPUs . . 16
2.1 Serial peripheral interface (SPI) /Inter-IC sound (I2S) . . . . . . . . . . . . . . . 16
2.1.1 Mono configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.1.2 Stereo configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2 Serial audio interface (SAI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.2.1 Using a single sub-block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.2.2 Using two synchronous SAI sub-blocks . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.2.3 Using PDM interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3 Digital filter for sigma delta modulators (DFSDM) . . . . . . . . . . . . . . . . . . 27
2.3.1 Stereo configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4 Clocking considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4.1 The digital microphone clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4.2 The peripheral clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.5 GPIOs number considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3 Digital signal processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.1 PDM audio software decoding library . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32