PDM Channel swapping at High PDM clock

Dear Nordic Team, 
I am currently working with 2 Infineon IM73D122V01 PDM Mems microphones to obtain stereo data, One is configured as left and the other is configured as right channel, To achieve better SNR, Infineon recommends using 3.072MHz PDM Clock, I am currently using 3.2Mhz clock with a ratio of 80.
For testing purposes i have covered the left microphone with glue and playing a fix 500hz tone to the mic and checking the output. 

1. For mono recording the setup works I can verify the frequency in STFT graph and i can see that the sensitivity of the left channel is considerable low.

2. For stereo recording i can still verify the frequency on both channels to be correct however the channels have swapped for some reason, left channel is supposed to be less sensitive (low amplitude in time domain plot), however i am getting more sensitivity on left channel as compared to right channel. 

3. I have also checked on 1.28MHz PDM clock and Stereo recording is correct (Channels are NOT swapped), 

4. I have also checked on different set of Microphones (Vesper VM3000) and i am seeing the same behaviour (Mono channel works correctly for both 1.28MHz and 3.2 MHz, stereo works for 1.28MHz but channel swapped for 3.2MHz).

What could be the reason for the channel swapping at 3.2MHz PDM clock and what is he solution to this problem. 

I am using NRF52840 module with NRF5SDK. Any help is greatly appreciated.

Thank you

  • Hi

    Just letting you know that we're currently looking into this issue. What library/driver are you using for PDM here, and what version of the SDK are you using exactly?

    Best regards,

    Simon

  • Hi

    I haven't seen this exact issue before, so exactly what is causing the left channel to be off is a bit of guesswork. Could it be that using PPI would help out here perhaps as is recommended for the ADC available here

    Can you provide some more details about what exactly is wrong on the left channel, is the sound higher or just the sensitivity so the output audio is incorrect?

    Best regards,

    Simon

  • Hi Simonr, Thank you for the reply, I am using PDM Library by Nordic, and I am using NRF5SDK v17.1.0
    here is my configuration

    ret_code_t err_code;
    uint32_t clk_freq = 0x19000000;
    nrfx_pdm_config_t config = NRFX_PDM_DEFAULT_CONFIG(PDM_CONFIG_IO_PDM_CLK, PDM_CONFIG_IO_PDM_DATA);
    config.gain_l = rec_config.gain;
    config.gain_r = rec_config.gain;
    config.clock_freq = ( nrf_pdm_freq_t )(clk_freq);
    config.edge = PDM_MODE_EDGE_LeftFalling;
    config.mode = PDM_MODE_OPERATION_Stereo;
    // set ratio to 80x
    NRF_PDM->RATIO = 1;
    
    err_code = nrfx_pdm_init(&config, PDM_drv_pdm_handler);
    APP_ERROR_CHECK(err_code);
    err_code = nrfx_pdm_start();
    APP_ERROR_CHECK(err_code);

  • Hi, so nothing is wrong with any channels in term of sensitivity or volume, both mics work correctly, however at 3.2MHz the PCM data containing the left and right channel pairs is swapped so when i separate them and plot the STFTs of each channel the Left channel data actually contains the right channel data and vice versa. 
    To further explain the issue here is an experiment I did.
    1. I intentionally made the Left channel Deaf (Covered the Left mic with glue so that its sensitivity will be really low).
    2. I took a stereo recording at PDM clock 1.2MHz where I played a 500Hz tone on speaker and plot the STFT of Left and right channel.

    3. As expected the left channel is Deaf and the Right channel shows a 500Hz Freq.

    4. I repeated the experiment with PDM clock 3.2Mhz, with the same setup (Left mic covered with glue and played a 500 Hz tone).

    5. This time the channels have swapped, instead of getting a straight line on the Right channel, I am getting the Line in Left channel . (Left channel was supposed to be deaf and should have nothing in the STFT).
    So the data is correct however it is Swapped at 3.2 MHz

  • Hi again Obaid

    Okay, thank you for the clarification. It seems very strange that it would swap like this. Would it be possible for you to use a scope to check the left-right word alignment for both scenarios so we can see if this is the driver that messes up or what. I have asked a bit around but we can't recall seeing this issue in the past unfortunately.

    Best regards,

    Simon

Related