SPM1423 "I2S" Microphone U089 Quirks



  • The module U089 is described as an I2S microphone. However, that seems not exactly true. While it can be accessed via an EDSFF I2S driver, it is not really true I2S. It supports only a clock and data line and does not have a frame select or word select line. To use the driver, it seems that you need to set some weird configurations. Using this device, the driver needs to connect the WS output to the clock pin. This is not a logically correct connection as one would assume that the bit clock line should be used. I lost many hours debugging why it did not work as I connected to the bit clock instead of the word select. The pin configurations that worked for me are shown below. "PIN_CLK" and "PIN_DATA" are the esp32 pins connected to the grove port.

    i2s_pin_config_t pin_config;
    pin_config.mck_io_num = I2S_PIN_NO_CHANGE;
    pin_config.bck_io_num = I2S_PIN_NO_CHANGE;
    pin_config.ws_io_num = PIN_CLK;
    pin_config.data_out_num = I2S_PIN_NO_CHANGE;
    pin_config.data_in_num = PIN_DATA;

    The appropriate "left" or "right" channel is also not clear. Both settings will produce an audio output. However, I cannot figure out which is the correct one. The U089 has the select pin grounded. From other datasheets, this would be the "right" channel. However, from the web page below,

    https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/i2s.html

    It appears that latching data on the rising edge of the clock is the left channel and not the right one. Therefore, either the espressif document is in error, or it this device is opposite the microphone datasheets.

    Does anyone know which is correct? The example code uses "right" but there is no explanation as to how that was determined.

    It would be nice it the example code had comments about the required pin configurations. That would probably help others from wasting time with the configuration, as I did.