Using I2S on IT with STM32F407, I observe that the SPI_I2S IT asserting rate is not the audio sampling rate.
The IT asserting rate seems to be totally de-correlated with the rate of reception of a sample from the microphone.
Has somebody already used a microphone MEMS I2S ICS-43434 by InvenSense-TDK ?
I don't succeed to connect a stereo pair of this microphone on a STM32F407 using STM32cubeMX to generate the HAL.
I2S2 is parameterized by STM32cubeMX as:
- Master Half duplex in mode receive
- I2S Philips
- 24 bits on 32bits frame
- 16kHz of audio sampling rate (PLLI2SCLK is 64MHz)
- clock polarization is low
hi2s2.Instance = SPI2;
hi2s2.Init.Mode = I2S_MODE_MASTER_RX;
hi2s2.Init.Standard = I2S_STANDARD_PHILIPS;
hi2s2.Init.DataFormat = I2S_DATAFORMAT_24B;
hi2s2.Init.MCLKOutput = I2S_MCLKOUTPUT_DISABLE;
hi2s2.Init.AudioFreq = I2S_AUDIOFREQ_16K;
hi2s2.Init.CPOL = I2S_CPOL_LOW;
hi2s2.Init.ClockSource = I2S_CLOCK_PLL;
hi2s2.Init.FullDuplexMode = I2S_FULLDUPLEXMODE_DISABLE;
if (HAL_I2S_Init(&hi2s2) != HAL_OK)
{
Error_Handler();
}
Well, with oscilloscope we can see :
- I2S_CK frequency is, as awaited, about 1MHz (64x16kHz)
- I2S_WS frequency is, as awaited, about 16kHz
- I2S_SD is compliant with I2S Philips standard with 24 bits.
But :
- the asserting rate of SPI_I2S IT is about 3.8 MHz ??
- the data get from the I2S handler are not as awaited (bad reception or bad re-built ?)
Many thanks for your help.
