2025-02-26 8:47 AM
Hello,
Configuring the I2S on CubeMX on STM32G431, for which I've connected a microphone in PDM, I want a sampling frequency of 48KHz@16bit.
Typically, this requires a PDM frequency of 3.072MHz and a decimation of 64.
I wonder why I need to tell CubeMX the sampling frequency, since the decimation factor is configured externally to CubeMX (in PDMTOPCM lib).
To have a PDM clock of 3.072MHz, I actually have to select a value of 192KHz for "selected audio frequency" in CubeMX, and not 48KHz.
I'm a bit confused...