2019-12-27 09:31 AM
Hey everyone,
I'm trying to send a 1.024MHz clock signal to the MP45DT02 microphone peripheral on the STM32F4 Discovery Board using the I2S_CLK of the I2S interface.
To do so, I'm using the following prescaler configurations:
HSE_Value = 8MHz
PLLM = 8 (Divider)
PLLI2SN = 258 (Multiplier)
PLLI2SR = 3 (Divider)
I2SDIV = 42,
I2SODD = 0
However, I also want to use the I2S Clock to sample the Serial Data output line of the MP45DT02 at a rate of 32KHz, since it appears each sample will retrieve 32 bits from the SD line since I'm using a 16-bit frame. Thus, that would give me 32bits*32KHz = 1,024,000 PDM samples/second.
However, in order to sample at 32KHz for a 16-bit format, I would need different prescaler values for the PLLI2S as shown in the table below, in order to change the I2S_CLK to 32KHz:
So the problem that arises is how can I send a 1.024MHz CLK signal to the mic while also sampling the SD line at 32KHz using the same clock (I2S_CLK)?
So what I'm wondering is, do I need to use two separate clocks (i.e. one for the MP45DT02 clk input and one for sampling the SD line) or am I misunderstanding something somewhere else?
Sorry if this is a trivial question or if I missed anything, it's my first embedded project and I've been stuck on this for quite sometime :(