Skip to content

Latest commit

 

History

History
76 lines (50 loc) · 2.86 KB

README.md

File metadata and controls

76 lines (50 loc) · 2.86 KB

MEMS Microphones

Use this code https://github.com/y2kblog/NUCLEO-L476RG_DFSDM_PDM-Mic to test X-NUCLEO-CCA02M1 expansion board.

DFSDM microphone acquisition

                    . . . . . . . . . . . . . . Arm Cortex-M4 . . . . . . . . . . . .
                    .   +-------+                                FFT                .
     +----- Clock ------|       |          +-----+   +-----+   +------+   +------+  .
     |              .   | DFSDM |-- PCM -->| DMA |-->| RAM |-->| Core |-->|USART2|-- UART/USB --> PC
     |              .   |       |          +-----+   +-----+   | DSP  |   +------+  .
     v              .   |       |                              +------+             .
[MEMS mic]--- PDM ----->|       |                                                   .
                    .   +-------+                                                   .
                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Expansion board

Use X-NUCLEO-CCA02M1 expansion board to test MEMS microphones with DFSDM.

expansion

As per the MEMC 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.

To obtain 100kHz sampling rate, the clock divider is set to 25 and the decimation factor to 32.

Bridge/jumper setting for one microphone (M1) acquisition

SB

Solder bridges to be closed

Bridge Connector Pin number STM32L476RG pin
SB12 CN7 35 PC2
SB16 CN10 28 PA6, PB14

Jumper pin setting

Jumper Position Description
J1 Open 5V generated on Nucleo
J2 1-2 Use on-board MIC 1(M1)

STM32L476RG pinout configuration (CubeMX)

Pinout

Schematics

Code (forked one)

https://github.com/araobp/NUCLEO-L476RG_DFSDM_PDM-Mic

Note: The project above has been converted from SW4STM32 into TrueSTUDIO project, and I have modified the pinout on CubeMX for the expansion board. I have also changed the operation to take a single-shot FFT result by pushing USER button on Nucleo board.

UART

Parameter Value
Baud rate 115200bps
Data 8bit
Parity None
Stop 1bit
Flow control None

Test under 15000Hz tone

plot_15000Hz