This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I2S 32-bit word size

Hello,

I am struggling with interfacing an I2S digital microphone to the nRF52. To be more concrete, it is the Knowles SPH0645LM4H-B. I connected it as suggested in this thread. In the data sheet of the microphone it says:

The SPH0645LM4H microphone operates as an I2S slave. The master must provide the BCLK and WS signals. The Over Sampling Rate is fixed at 64 therefore the WS signal must be BCLK/64 and synchronized to the BCLK. Clock frequencies from 2.048Mhz to 4.096MHz are supported so sampling rates from 32KHz to 64KHz can be had by changing the clock frequency. The Data Format is I2S, 24 bit, 2’s compliment, MSB first. The Data Precision is 18 bits, unused bits are zeros.

I find this contradictory with the figure also provided in the data sheet of the microphone:

image description

In the image it is clear to see that WS toggles first after 32 clocks, which -for me- means, the word size is 32 bits (18 bits data, 6 bits set to 0, and 8 further bits floating).

The problem is that the nRF52's I2S interface does not support 32-bit word size.

/**
 * @brief I2S sample widths.
 */
typedef enum
{
    NRF_I2S_SWIDTH_8BIT  = I2S_CONFIG_SWIDTH_SWIDTH_8Bit,  ///< 8 bit.
    NRF_I2S_SWIDTH_16BIT = I2S_CONFIG_SWIDTH_SWIDTH_16Bit, ///< 16 bit.
    NRF_I2S_SWIDTH_24BIT = I2S_CONFIG_SWIDTH_SWIDTH_24Bit,  ///< 24 bit.
} nrf_i2s_swidth_t;

No matter what settings I try with the available 8, 16, or 24 bit word-size, I can't get all the relevant data bits from the microphone's data stream.

Any ideas how to solve this problem? Or are these two components (nRF52 and Knowles mic) simply incompatible?

Thank you in advance! NewtoM

Parents
  • Hello, This seems to be a major issue with the nRF52 I2S not supporting a 32bit Data length. Every I2S Digital Microphone that is referenced in these forum posts(ICS-43432 & SPH0645LM4H-B) require 32 clocks for both the left and right signals regardless if the Data itself is only 24bits. The 32 clocks is what is expected to alternate the WS/LRCLK signal between the Left and Right channels. Without being able to define the sample width to be 32bits it does not seem to be possible to ever get the I2S module to work with any of these I2S output Microphones as the Data Width definition is directly related to how many clocks are presented for each channel. image description

    So my question is whether or not this is a matter that can be resolved by a SDK update or if the 24bit DataWidth is hard fixed in the I2S silicon on the nRF52. If it is hard-fixed there does not appear to be hope to be able to use any of these I2S Digital output microphones with the nRF52...and off to using the less than preferred PDM method.

    Regards, Frank

  • Hi Frank,

    The nRF52832 only supports 32 bit width in I2S-slave mode. I will report this back to our product management, so that they can take this into consideration in the future.

    Best regards, Håkon

Reply Children
Related