Hardware
description
UM1900
8/20
DocID027905 Rev 4
2.2
Audio acquisition strategy
A digital MEMS microphone can be acquired via different peripherals, such as SPI, I²S,
GPIO or DFSDM. It requires an input clock and it outputs a PDM stream at the same
frequency of the input clock. This PDM stream is further filtered and decimated for
conversion into PCM standard for audio transmission.
Two different digital MEMS microphones can be connected on the same data line,
configuring the first to generate valid data on the rising edge of the clock and the other on
the falling edge, by setting the L/R pin of each microphone accordingly. On the X-
NUCLEO-CCA02M1 expansion board, two microphones share the same data line and can
be managed differently, depending on the MCU capabilities.
If a digital filter for sigma delta modulators (DFSDM) peripheral is available, the
microphones can be routed to DFSDM channels, otherwise use the I²S peripheral for the
first and the second microphone and the SPI peripheral for the third and the fourth.
2.2.1
DFSDM microphone acquisition
The DFSDM peripheral generates the precise clock needed by the microphones and reads
the data on the rising and falling edges of each PDM line. Acquired signals are then input
to DSFDM filters for hardware filtering and decimation to generate standard PCM streams.
An additional software high pass filtering stage removes any DC offset in the output
stream. DMA is used to reduce MCU load.
2.2.2
I²S and SPI microphone acquisition
In this scenario, a precise clock signal is generated by the I²S peripheral while the SPI is
configured in slave mode and is fed by the same timing signal generated by I²S. This clock
is then halved by a timer and input to the microphones. The SPI and I²S peripherals
operate at twice the microphone frequency to read the data on both the rising and falling
edges of the microphone clock, thus reading the bits of two microphones each.
A software demuxing step separates the signal from the two microphones and allows
further processing like PDM-to-PCM
a
conversion.
a
For further information regarding MEMS microphone and PDM-to-PCM decimation, please refer to application
note AN3998 on www.st.com.