Skip to content

I2S cannot read and write stereo data correctly #859

@qiaodongdiqiu

Description

@qiaodongdiqiu

I tested with 48KHz, 16-bits stereo audio data.I found that there is a bug in this I2S driver, all data will be shifted to the right by one bit when writing.Stereo audio files cannot be played using this I2S driver. Through the logic analyzer, we can see that the transmitted data has changed.And I compared the I2S timing of playing the same audio file with ESP32. They are different. The level inversion of BCLK and WCLK of ESP32 is time difference, but RP2040 does not.There is also a problem with reading data using this I2S driver, the data for the right channel is always incorrect.I checked the I2S timing with a logic analyzer and found that the problem seems to be related to the shifting of the PIO.Logic analysis prompt “The initial (idle) state of the CLK line does not match the settings”.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions