cancel
Showing results for 
Search instead for 
Did you mean: 

Using I2S on IT with STM32F407, I observe that the SPI_I2S IT asserting rate is not the audio sampling rate.

Jean DEMARTINI
Associate II

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 :

  1. the asserting rate of SPI_I2S IT is about 3.8 MHz ??
  2. the data get from the I2S handler are not as awaited (bad reception or bad re-built ?)

Many thanks for your help.

3 REPLIES 3

What is "IT rising rate"?

JW

My English is not as good as I wish. The right word is perhaps "raising". I was describing the time when the IT is asserted and the ISR is launched. Kindly yours. Jean Demartini Mob. +33 6 80 30 00 94 www.sensivic.com <> USS SENSIVIC <> Medaille d'Or Trophees Securite 2016 <> USS SENSIVIC S.A.S. - +33 2 38 69 82 96 4100 Orléans - France SENSIVIC est membre de : Membre AN2V <> Membre Pole Safe <> Le 04/09/2020 à 01:12, ST Community a écrit :

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