I can't use the I2S in nRF52840 DK

I can't use the I2S api and I2S function in code the compiler says undefined Module , and when i checked the devicetree file there in no definition for the i2s devices

Parents
  • Hi,

    I see from your previous case that you have already found the academy course, but here's some information anyways: 

    Here's a couple of getting started resources that I recommend everyone who's getting started with NCS and Zephyr to go through:

    The Academy pages has a fundamentals course and an intermediate course which are great for understanding and familiarizing yourself with various topics: https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/ and https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/. Specially go through lesson 2 and 3 in the fundamentals course which targets Devicetree, overlays and how to add your own nodes.

    All of the courses and lessons contains theory, links to our official documentation and samples/hands on exercises you can go through and use for learning.

    I can't use the I2S api and I2S function in code the compiler says undefined Module , and when i checked the devicetree file there in no definition for the i2s devices

    As you've already stated, you need to create and initialize this device for you to be able to use it. Please go thoroughly through the courses I linked you.

    Another tips for you for later queries is also to give more information regarding your issue, such as

    1. What SDK and version of SDK are you using
    2. What boards you're using
    3. Build error logs (use insert -> Code to upload them to the ticket)
    4. Device logs (use insert -> Code to upload them to the ticket)

    Kind regards,
    Andreas

  • I understand but still I can't use the I2S device, if you have simple application which taken the data from an I2S mic and Store it in a buffer Please give me the link , I'd be so thankful to you 

Reply Children
  • Please have a look at either of these.
    1. The I2S Output Sample demonstrates how to use an I2S driver to send an output stream of audio data. The sample sends a short burst of audio data, consisting of a sine wave.
    2. The ArgonKey Board Microphone Sample provides an example of how to acquire audio through the on-board MP34DT05 microphone. The microphone generates a PDM stream which is acquired through I2S.
    3. The I2S Echo Sample demonstrates how to use an I2S driver in a simple processing of an audio stream. It configures and starts both the RX and TX streams and then mixes the original signal with its delayed form that is buffered, providing a simple echo effect.
    4. The X-NUCLEO-IKS02A1 Shield - MEMS Microphone Sample provides an example of how to acquire audio through the digital MEMS microphone on X-NUCLEO-IKS02A1 shield. The microphone generates a PDM stream which is acquired through I2S.
    Please refer to the respective links for more detailed information on each sample.
    Kind regards,
    Andreas
Related