Hello at everyone ,
I'm making an audio applikation (Teensy 3.5) with an I2S MEMS Mikrophone. I've connected everything and it is working fine, but I'm curious how the BCLK (Bit Clock) is generated.
By reasearch i found out that the BCLK is generated by the MCLK (which is generated by a division and a fraction of a PLL). When I go into this line
I see, that there is a BCLK for the receiver and the transmitter. I also see that there is a divisior for the BCLK.
Let's say i want a samplerate of 8 kHz with 16 bit integer (you'll see later why i choosed this). That would make the MCLK at a frequency of 2 048 000 Hz (MULT is 32, DIV is 1875, so (120 000 * MULT / DIV / 256 / 32 kHz). If you go to the Manual of the Chip you'll see (Page 1740) that the DIV of the BCLK will divide down the audio master clock to generate the bit clock when configured for an internal bit clock with a division value of (DIV + 1) * 2. The BCLK therefore would be 512 kHz (around 0.5 MHz).
If you go to the Wikipedia lage of I2S and you go to the second Reference (http://www.analog.com/media/en/technical-documentation/technical-articles/MS-2275.pdf) you can extract the information "An I2S data stream can carry one or two channels of data with a typical bit clock rate between 512 kHz, for an 8 kHz sampling rate [...]" (page 2, last paragraph at the left side). Informations like this are also in some manuals for microphones so I assume that this is the correct one (Example: https://www.digikey.com/product-detail/en/knowles/SPH0645LM4H-B/423-1405-2-ND/5332440 Datasheet page 07, Interface description).
But on the Wikipedia page (https://en.wikipedia.org/wiki/I²S) there is a diffrent formula for the BCLK.
BCLK = samplerate * bits per channel * number of channels
Therefore the samplerate would be 8 kHz * 16 * 2 = 256 kHz (0.256 MHz).
Which of these informations are correct?
I'm making an audio applikation (Teensy 3.5) with an I2S MEMS Mikrophone. I've connected everything and it is working fine, but I'm curious how the BCLK (Bit Clock) is generated.
By reasearch i found out that the BCLK is generated by the MCLK (which is generated by a division and a fraction of a PLL). When I go into this line
Code:
I2S0_RCR2 = I2S_RCR2_SYNC(1) | I2S_TCR2_BCP | I2S_RCR2_MSEL(1)| I2S_RCR2_BCD | I2S_RCR2_DIV(1);
Let's say i want a samplerate of 8 kHz with 16 bit integer (you'll see later why i choosed this). That would make the MCLK at a frequency of 2 048 000 Hz (MULT is 32, DIV is 1875, so (120 000 * MULT / DIV / 256 / 32 kHz). If you go to the Manual of the Chip you'll see (Page 1740) that the DIV of the BCLK will divide down the audio master clock to generate the bit clock when configured for an internal bit clock with a division value of (DIV + 1) * 2. The BCLK therefore would be 512 kHz (around 0.5 MHz).
If you go to the Wikipedia lage of I2S and you go to the second Reference (http://www.analog.com/media/en/technical-documentation/technical-articles/MS-2275.pdf) you can extract the information "An I2S data stream can carry one or two channels of data with a typical bit clock rate between 512 kHz, for an 8 kHz sampling rate [...]" (page 2, last paragraph at the left side). Informations like this are also in some manuals for microphones so I assume that this is the correct one (Example: https://www.digikey.com/product-detail/en/knowles/SPH0645LM4H-B/423-1405-2-ND/5332440 Datasheet page 07, Interface description).
But on the Wikipedia page (https://en.wikipedia.org/wiki/I²S) there is a diffrent formula for the BCLK.
BCLK = samplerate * bits per channel * number of channels
Therefore the samplerate would be 8 kHz * 16 * 2 = 256 kHz (0.256 MHz).
Which of these informations are correct?