Using I2S on IT with STM32F407, I observe that the SPI_I2S IT asserting rate is not the audio sampling rate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-03 7:19 AM
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.
- Labels:
-
I2S
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-03 4:11 PM
What is "IT rising rate"?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-04 1:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-04 4:35 AM
Ah, by IT you mean interrupts... "raising interrupt" is IMO a perfectly OK idiom; I just wasn't familiar with the "IT" abbreviation... =)
3.8MHz interrupt rate - especially when using Cube - sounds like the interrupt permanently being invoked again, maybe due to some of the flags not being cleared properly in the ISR - maybe overrun, or maybe TXE (which actually cannot be cleared, has to be disabled).
JW
