Showing results for 
Search instead for 
Did you mean: 

STM32H743 Clock to pdm microphone is not changing



I'm just started using a nucleo-h743x. I have configured the I2S to acquire some audio from the a digital microphone.

Supposing that I use one of SPI1,2,3 for that, the i2s clock reaching the peripheral should the one that in MX is called (To SPI 1,2,3) right?

The peripheral is configured as Half Duplex Master Receive, 24bit in 32bit dataframe, MSB First, Fs 32kHz (see image attached).



Measuring with the oscilloscope the PDM clock reaching the microphone I see 1Mhz (which is low for the microphone I’m using). I would like to increase I but I don’t really understand the relation between the i2s clock and the actual frequency reaching the microphone. ST describes, in the pdm2pcm YouTube video a relation between sampling frequency and decimation and actual pdm clock. But this is not possibile, the i2s is a peripheral and pdm2pcm is a library and changing decimation has not effect on the microphone clock.

Changing PLL1 divider R (PLL_I2SR should be the clock source) has no effect at all.  In other stm32 changing that divider has effect directly on the pdm clock signal.


Dear @Eleon BORLINI ,

do you have any idea on why this is happening?

ST Employee

Hello @frnt,

As you already said, 1MHz clock is not enough to let the microphone working properly. Before making any kind of signal processing on the PDM signal, you must respect the requirement from microphone datasheet and upgrade the SPI configuration to have at least 1.2MHz (this value can change on any specific microphone part number, so please refer to the datasheet for the exact value needed in your setup). This is mandatory, and involves to select properly the PLL divider.

Once the PDM clock is setup as expected, you can follow the YouTube guide to setup properly the decimation field required from the pdm2pcm filter.

Be aware that PLL divider and decimation factor have 2 different meanings and you must setup both to get the desired audio sampling frequency.


Best regards