Use X-NUCLEO-CCA02M1 expansion board to test MEMS microphones with DFSDM.
As per the MEMS mic datasheet, input clock frequency Max value is 3.25MHz.
Given the system clock rate at 80MHz, the clock divider should be larger than 25.
In this project, to obtain 48kHz sampling rate, the clock divider is set to 52 and the decimation factor to 32: one 2048 samples corresponds to 42.6msec.
Solder bridges to be closed
| Bridge | Connector | Pin number | STM32L476RG pin | Description |
|---|---|---|---|---|
| SB9 | CN10 | 28 | PA6, PB14 | MIC_PDM12(M1) |
| SB12 | CN7 | 35 | PC2 | MIC_CLOCK_NUCLEO |
| SB16 | CN10 | 28 | PA6, PB14 | MIC_PDM12(M1) |
| SB17 | CN10 | 25 | PB10 | MIC_PDM34(M2) |
Note: SB9 should be closed instead of SB17 for acquiring both L/R sound on a single PDM line.
Jumper pin setting
| Jumper | Position | Description |
|---|---|---|
| J1 | Open | 5V generated on Nucleo |
| J2 | 1-2 | Use on-board MIC 1(M1) |
| J3 | 1-2 | Use on-board MIC 2(M2) |
Note: M1's L/R pin is pulled-down and M2's L/R pin is pulled-up.
This configuration use two lines to aquire sound: one for left mic and the other for right mic.
It is also possible to use only one line for both L/R sound acquisition.
| Parameter | Value |
|---|---|
| Baud rate | 115200bps |
| Data | 8bit |
| Parity | None |
| Stop | 1bit |
| Flow control | None |
I used this on-line tone generator to generate sine-wave tone at 18000Hz frequency.
Vaccum cleaner seems to generate tone at around 5000Hz:
- http://y2kblog.wp.xdomain.jp/pdm_digitalmic_1_stm32l4_dfsdm/
- https://github.com/y2kblog/NUCLEO-L476RG_DFSDM_PDM-Mic
- http://www.fbs.osaka-u.ac.jp/labs/ishijima/FFT-01.html
- http://www.ic.is.tohoku.ac.jp/~swk/lecture/yaruodsp/toc.html
- Getting started with MEMS microphone expansion board
- STM32L4 DFSDM
- Interfacing PDM digital microphones using STM32 32-bit Arm® Cortex® MCUs







