22.3. I2S Interrupt

22.3.1. Overview

This example shows I2S transfer audio data with Interrupt way to audio codec on board.

22.3.2. Project Configuration

  • In the file CMakeLists.txt, set a matched audio codec type according to the development board schematic,e.g. “set(CONFIG_CODEC “sgtl5000”)”

22.3.3. Board Setting

  • Connect headphone to the headphone interface on the audio codec chip.

22.3.4. Known Issue

  • When using the headphone interface of Codec to play audio on some development boards, there may be crosstalk. For example, when playing mono audio through the left channel of the headphone, weak sound can be heard on the right channel headphone.

22.3.5. Running the example

When the example runs successfully, the headset will play the sound, and the following message is displayed in the terminal:

I2S Interrupt example
I2C bus is ready
I2S interrupt play finished