nRF9151 DK – I2S support and TLV320DAC3100 testing

Hello Nordic Team,

I am working with the nRF9151 DK and exploring audio output using the TLV320DAC3100 DAC.

I see that I2C is clearly available in the DK schematic, but I2S signals are not obvious or exposed, even though Zephyr provides I2S drivers for the nRF91 series.

Could you please clarify:

  1. Whether I2S testing is officially supported on the nRF9151 DK?
  2. If supported, how the I2S pins are expected to be accessed on the DK.
  3. If not, whether testing TLV320DAC3100 with nRF9151 is recommended, or if another DK is better suited.

Thanks for your guidance.

Best regards,
Subhiksha

Parents
  • Hi Subhiksha,

    Whether I2S testing is officially supported on the nRF9151 DK?

    Yes, the nRF9151 has a dedicated I2S peripheral (link).

    If supported, how the I2S pins are expected to be accessed on the DK.

    The I2S peripheral is accessed through the classic I2S driver from Zephyr (link). Under the hood it uses our nrfx I2S driver but if you don't plan on doing strange things with the peripheral, you shouldn't have to touch this.

    If not, whether testing TLV320DAC3100 with nRF9151 is recommended, or if another DK is better suited.

    It depends if you plan on using the cellular capabilities of the nRF9151 or not. If you don't care about the cellular capabilities, you should rather go with something else (nRF5340 Audio DK (wireless audio) or nRF54L15 DK (wired audio)). If you want cellular capabilities, then the nRF9151 is perfectly fine.

    However, if you are still not sure about which DK or chip you should get, please contact your regional sales manager.

    Best regards,

    Simon D-M

  • Hi Simon,

    Thank you for the detailed clarification.

    I would like some guidance on the software/sample side:

    • Which nRF Connect SDK version is recommended for testing I2S on nRF9151 DK?
    • Which Zephyr/NCS samples should be used as a reference for I2S audio output on nRF9151?

    I tried building the i2s_codec sample, but I am currently running into build errors.
    Before debugging further, I wanted to confirm whether this sample is expected to work on nRF9151, or if there is a more appropriate I2S-related example (minimal TX test, loopback, etc.) for this device.

    My goal is only to validate basic I2S + external DAC (TLV320DAC3100) functionality.

    Thanks in advance for your guidance.

    Best regards,
    Subhiksha

  • Hi,

    Subhiksha said:
    Which nRF Connect SDK version is recommended for testing I2S on nRF9151 DK?

    When starting a project, I always recommend going with the latest released version of nRF Connect SDK (currently it is v3.2.4). 

    Subhiksha said:
    Which Zephyr/NCS samples should be used as a reference for I2S audio output on nRF9151?

    There are 3 samples that are I2S-related (link). They were not directly made by Nordic, so most of them don't have support for our board by default. However, it shouldn't be too hard to make the overlay file (and maybe a config file) needed to make the sample run on a nRF9151 DK. I would recommend starting with i2s_output sample, as it seemed to be the easiest and simplest of three samples.

    You will at least need to make an overlay file for the nRF9151 and maybe a config file for the sample to compile. If you need help, I would recommend trying to use our AI (blue circle, bottom right). It is quite good at finding documentation and making simple code snippets.

    If you still don't manage to get sample working, feel free to reach out.

    Best regards,

    Simon D-M

  • Hi Simon,
    Thanks for your response.
    I am working on bringing up I2S audio output on nRF9151 DK with an external DAC (TLV320DAC3100) using nRF Connect SDK v3.2.4, but I am facing multiple build‑time issues related to devicetree and system configuration.
    While I2C communication with the DAC works correctly, enabling I2S results in repeated devicetree and build errors, including pinctrl‑related errors (pinctrl-0 is required), unable to evaluate expression errors when using NRF_PSEL() macros, overlay not being picked up correctly (especially for _ns builds), and additional build failures related to sysbuild/partition configuration.
    Even after correcting overlay naming, adding proper pinctrl definitions, and doing full clean builds, the issues persist, making it unclear what the recommended or known‑working approach is for configuring I2S on nRF9151 DK.
    Guidance or a reference example for a minimal, working I2S setup on nRF9151 would be very helpful.
    Regards,
    Subhiksha
Reply
  • Hi Simon,
    Thanks for your response.
    I am working on bringing up I2S audio output on nRF9151 DK with an external DAC (TLV320DAC3100) using nRF Connect SDK v3.2.4, but I am facing multiple build‑time issues related to devicetree and system configuration.
    While I2C communication with the DAC works correctly, enabling I2S results in repeated devicetree and build errors, including pinctrl‑related errors (pinctrl-0 is required), unable to evaluate expression errors when using NRF_PSEL() macros, overlay not being picked up correctly (especially for _ns builds), and additional build failures related to sysbuild/partition configuration.
    Even after correcting overlay naming, adding proper pinctrl definitions, and doing full clean builds, the issues persist, making it unclear what the recommended or known‑working approach is for configuring I2S on nRF9151 DK.
    Guidance or a reference example for a minimal, working I2S setup on nRF9151 would be very helpful.
    Regards,
    Subhiksha
Children
  • Hi Subhiksha,

    Subhiksha said:
    Guidance or a reference example for a minimal, working I2S setup on nRF9151 would be very helpful.

    I quickly made this overlay file to make the nRF9151 DK build with the i2s_output sample. 

    nrf9151dk_nrf9151_ns.overlay

     / {
    	aliases {
    		i2s-tx = &i2s0;
    	};
    };
    
    &pinctrl {
        i2s0_default_alt: i2s0_default_alt {
            group1 {
                psels = <NRF_PSEL(I2S_SCK_M, 0, 25)>,   /* SCK (BCLK) on P0.25 */
                        <NRF_PSEL(I2S_LRCK_M, 0, 26)>,  /* LRCK (FSYNC) on P0.26 */
                        <NRF_PSEL(I2S_SDOUT, 0, 27)>,   /* SDOUT on P0.27 */
                        <NRF_PSEL(I2S_SDIN, 0, 24)>;    /* SDIN on P0.24 */
            };
        };
    
        i2s0_sleep_alt: i2s0_sleep_alt {
            group1 {
                psels = <NRF_PSEL(I2S_SCK_M, 0, 25)>,
                        <NRF_PSEL(I2S_LRCK_M, 0, 26)>,
                        <NRF_PSEL(I2S_SDOUT, 0, 27)>,
                        <NRF_PSEL(I2S_SDIN, 0, 24)>;
                low-power-enable;
            };
        };
    };
    
    &i2s0 {
        status = "okay";
        pinctrl-0 = <&i2s0_default_alt>;
        pinctrl-1 = <&i2s0_sleep_alt>;
        pinctrl-names = "default", "sleep";
        compatible = "nordic,nrf-i2s";
    };

    I don't know if it works as I don't have the needed hardware to test it, but at least it builds. I also used some arbitrary pins on the DK, so feel free to change them to match your needs.

    If you are still not able to build your project, please share the full pristine build logs, the overlay file and maybe some code snippets. 

    Best regards,

    Simon D-M

  • Hi Simon,

    Thanks a lot for taking the time to create and share the overlay example — really appreciate it.

    Based on your suggestion, I’ve captured the full pristine build logs, along with the overlay snippet and relevant project details from my setup. Even though the overlay structure matches the expected pinctrl-based configuration, I am still running into build‑time devicetree errors (including NRF_PSEL() evaluation issues and pinctrl-related failures) in my setup.

    I am sharing below:

    • The overlay file currently used in my project
    • The complete pristine build logs for reference

    It would be very helpful if you could take a look and let me know if I’m missing any nRF9151‑specific requirement (for example, expected pinctrl include paths, differences in _ns build handling, or any prerequisite configuration when enabling I2S).

    Thanks again for your support and for sharing a buildable reference. Looking forward to your guidance.

    Best regards,

    subhiksha

    Executing task: nRF Connect: Build [incremental]: at_monitor/build/at_monitor 
    
    Building at_monitor
    west build --build-dir d:/vscode_workspace/at_monitor/build --domain at_monitor
    
    -- west build: building domain(s): at_monitor
    [1/19] Linking C static library zephyr\drivers\serial\libdrivers__serial.a
    [2/19] Building C object CMakeFiles/app.dir/src/tlv320dac3100.c.obj
    FAILED: CMakeFiles/app.dir/src/tlv320dac3100.c.obj 
    C:\ncs\toolchains\fd21892d0f\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DK_HEAP_MEM_POOL_SIZE=8192 -DNRF54L_CONFIGURATION_56_ENABLE=0 -DNRF9120_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DPICOLIBC_DOUBLE_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -ID:/vscode_workspace/at_monitor/include -ID:/vscode_workspace/at_monitor/build/at_monitor/zephyr/include/generated/zephyr -IC:/ncs/v3.2.4/zephyr/include -ID:/vscode_workspace/at_monitor/build/at_monitor/zephyr/include/generated -IC:/ncs/v3.2.4/zephyr/soc/nordic -IC:/ncs/v3.2.4/zephyr/lib/posix/options/getopt -IC:/ncs/v3.2.4/zephyr/soc/nordic/nrf91/. -IC:/ncs/v3.2.4/zephyr/soc/nordic/common/. -IC:/ncs/v3.2.4/zephyr/subsys/shell/modules/kernel_service/thread/.. -IC:/ncs/v3.2.4/nrf/include -IC:/ncs/v3.2.4/nrf/tests/include -IC:/ncs/v3.2.4/modules/hal/cmsis_6/CMSIS/Core/Include -IC:/ncs/v3.2.4/zephyr/modules/cmsis_6/. -IC:/ncs/v3.2.4/nrf/modules/hal_nordic/. -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx/bsp/stable -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx/bsp/stable/templates -IC:/ncs/v3.2.4/zephyr/modules/hal_nordic/nrfx/. -isystem C:/ncs/v3.2.4/zephyr/lib/libc/common/include -isystem C:/ncs/v3.2.4/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros D:/vscode_workspace/at_monitor/build/at_monitor/zephyr/include/generated/zephyr/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/fd21892d0f/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v3.2.4/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=D:/vscode_workspace/at_monitor=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v3.2.4/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v3.2.4=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=picolibc.specs -D_POSIX_THREADS -std=c99 -MD -MT CMakeFiles/app.dir/src/tlv320dac3100.c.obj -MF CMakeFiles\app.dir\src\tlv320dac3100.c.obj.d -o CMakeFiles/app.dir/src/tlv320dac3100.c.obj -c D:/vscode_workspace/at_monitor/src/tlv320dac3100.c
    D:/vscode_workspace/at_monitor/src/tlv320dac3100.c:20:10: fatal error: zephyr/include/zephyr/sys/clock.h: No such file or directory
       20 | #include <zephyr/include/zephyr/sys/clock.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    [3/19] Linking C static library zephyr\drivers\timer\libdrivers__timer.a
    [4/19] Linking C static library modules\nrf\drivers\hw_cc3xx\lib..__nrf__drivers__hw_cc3xx.a
    [5/19] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj 
    C:\ncs\toolchains\fd21892d0f\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DK_HEAP_MEM_POOL_SIZE=8192 -DNRF54L_CONFIGURATION_56_ENABLE=0 -DNRF9120_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DPICOLIBC_DOUBLE_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -ID:/vscode_workspace/at_monitor/include -ID:/vscode_workspace/at_monitor/build/at_monitor/zephyr/include/generated/zephyr -IC:/ncs/v3.2.4/zephyr/include -ID:/vscode_workspace/at_monitor/build/at_monitor/zephyr/include/generated -IC:/ncs/v3.2.4/zephyr/soc/nordic -IC:/ncs/v3.2.4/zephyr/lib/posix/options/getopt -IC:/ncs/v3.2.4/zephyr/soc/nordic/nrf91/. -IC:/ncs/v3.2.4/zephyr/soc/nordic/common/. -IC:/ncs/v3.2.4/zephyr/subsys/shell/modules/kernel_service/thread/.. -IC:/ncs/v3.2.4/nrf/include -IC:/ncs/v3.2.4/nrf/tests/include -IC:/ncs/v3.2.4/modules/hal/cmsis_6/CMSIS/Core/Include -IC:/ncs/v3.2.4/zephyr/modules/cmsis_6/. -IC:/ncs/v3.2.4/nrf/modules/hal_nordic/. -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx/bsp/stable -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx/bsp/stable/templates -IC:/ncs/v3.2.4/zephyr/modules/hal_nordic/nrfx/. -isystem C:/ncs/v3.2.4/zephyr/lib/libc/common/include -isystem C:/ncs/v3.2.4/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros D:/vscode_workspace/at_monitor/build/at_monitor/zephyr/include/generated/zephyr/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/fd21892d0f/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v3.2.4/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=D:/vscode_workspace/at_monitor=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v3.2.4/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v3.2.4=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=picolibc.specs -D_POSIX_THREADS -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c D:/vscode_workspace/at_monitor/src/main.c
    In file included from C:/ncs/v3.2.4/zephyr/include/zephyr/toolchain/gcc.h:98,
                     from C:/ncs/v3.2.4/zephyr/include/zephyr/toolchain.h:52,
                     from C:/ncs/v3.2.4/zephyr/include/zephyr/kernel_includes.h:23,
                     from C:/ncs/v3.2.4/zephyr/include/zephyr/kernel.h:17,
                     from D:/vscode_workspace/at_monitor/src/main.c:18:
    D:/vscode_workspace/at_monitor/src/main.c: In function 'audio_thread_fn':
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:96:41: error: '__device_dts_ord_78' undeclared (first use in this function); did you mean '__device_dts_ord_18'?
       96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/toolchain/common.h:168:26: note: in definition of macro '_DO_CONCAT'
      168 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:96:33: note: in expansion of macro '_CONCAT'
       96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:297:37: note: in expansion of macro 'DEVICE_NAME_GET'
      297 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:314:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      314 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    D:/vscode_workspace/at_monitor/src/main.c:154:36: note: in expansion of macro 'DEVICE_DT_GET'
      154 |     const struct device *i2s_dev = DEVICE_DT_GET(I2S_NODE);
          |                                    ^~~~~~~~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:96:41: note: each undeclared identifier is reported only once for each function it appears in
       96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/toolchain/common.h:168:26: note: in definition of macro '_DO_CONCAT'
      168 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:96:33: note: in expansion of macro '_CONCAT'
       96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:297:37: note: in expansion of macro 'DEVICE_NAME_GET'
      297 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:314:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      314 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    D:/vscode_workspace/at_monitor/src/main.c:154:36: note: in expansion of macro 'DEVICE_DT_GET'
      154 |     const struct device *i2s_dev = DEVICE_DT_GET(I2S_NODE);
          |                                    ^~~~~~~~~~~~~
    In file included from D:/vscode_workspace/at_monitor/src/main.c:25:
    D:/vscode_workspace/at_monitor/src/main.c: In function 'cmd_vol':
    D:/vscode_workspace/at_monitor/src/main.c:287:41: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
      287 |                 _vol_db, (float)_vol_db * 0.5f);
          |                          ~~~~~~~~~~~~~~~^~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/shell/shell.h:1267:47: note: in definition of macro 'shell_print'
     1267 |         shell_fprintf_normal(_sh, _ft "\n", ##__VA_ARGS__)
          |                                               ^~~~~~~~~~~
    [6/19] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.2.4/modules/hal/nordic/nrfx/drivers/src/nrfx_clock_hfclkaudio.c.obj
    [7/19] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.2.4/modules/hal/nordic/nrfx/drivers/src/nrfx_clock_xo.c.obj
    [8/19] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.2.4/modules/hal/nordic/nrfx/drivers/src/nrfx_clock_hfclk.c.obj
    [9/19] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.2.4/modules/hal/nordic/nrfx/drivers/src/nrfx_twi_twim.c.obj
    [10/19] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.2.4/modules/hal/nordic/nrfx/drivers/src/nrfx_twim.c.obj
    [11/19] Building C object modules/hal_nordic/modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v3.2.4/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\fd21892d0f\opt\bin\cmake.EXE' --build D:/vscode_workspace/at_monitor/build/at_monitor
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 

  • Hi,

    There are 2 errors from what I can see from the logs:

    FAILED: CMakeFiles/app.dir/src/tlv320dac3100.c.obj 
    C:\ncs\toolchains\fd21892d0f\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DK_HEAP_MEM_POOL_SIZE=8192 -DNRF54L_CONFIGURATION_56_ENABLE=0 -DNRF9120_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DPICOLIBC_DOUBLE_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -ID:/vscode_workspace/at_monitor/include -ID:/vscode_workspace/at_monitor/build/at_monitor/zephyr/include/generated/zephyr -IC:/ncs/v3.2.4/zephyr/include -ID:/vscode_workspace/at_monitor/build/at_monitor/zephyr/include/generated -IC:/ncs/v3.2.4/zephyr/soc/nordic -IC:/ncs/v3.2.4/zephyr/lib/posix/options/getopt -IC:/ncs/v3.2.4/zephyr/soc/nordic/nrf91/. -IC:/ncs/v3.2.4/zephyr/soc/nordic/common/. -IC:/ncs/v3.2.4/zephyr/subsys/shell/modules/kernel_service/thread/.. -IC:/ncs/v3.2.4/nrf/include -IC:/ncs/v3.2.4/nrf/tests/include -IC:/ncs/v3.2.4/modules/hal/cmsis_6/CMSIS/Core/Include -IC:/ncs/v3.2.4/zephyr/modules/cmsis_6/. -IC:/ncs/v3.2.4/nrf/modules/hal_nordic/. -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx/bsp/stable -IC:/ncs/v3.2.4/modules/hal/nordic/nrfx/bsp/stable/templates -IC:/ncs/v3.2.4/zephyr/modules/hal_nordic/nrfx/. -isystem C:/ncs/v3.2.4/zephyr/lib/libc/common/include -isystem C:/ncs/v3.2.4/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros D:/vscode_workspace/at_monitor/build/at_monitor/zephyr/include/generated/zephyr/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/fd21892d0f/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v3.2.4/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=D:/vscode_workspace/at_monitor=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v3.2.4/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v3.2.4=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=picolibc.specs -D_POSIX_THREADS -std=c99 -MD -MT CMakeFiles/app.dir/src/tlv320dac3100.c.obj -MF CMakeFiles\app.dir\src\tlv320dac3100.c.obj.d -o CMakeFiles/app.dir/src/tlv320dac3100.c.obj -c D:/vscode_workspace/at_monitor/src/tlv320dac3100.c
    D:/vscode_workspace/at_monitor/src/tlv320dac3100.c:20:10: fatal error: zephyr/include/zephyr/sys/clock.h: No such file or directory
       20 | #include <zephyr/include/zephyr/sys/clock.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Your "#include" path is wrong. You don't have to put "zephyr/include/..." you should directly include <zephyr/sys/clock.h>.

    D:/vscode_workspace/at_monitor/src/main.c: In function 'audio_thread_fn':
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:96:41: error: '__device_dts_ord_78' undeclared (first use in this function); did you mean '__device_dts_ord_18'?
       96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/toolchain/common.h:168:26: note: in definition of macro '_DO_CONCAT'
      168 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:96:33: note: in expansion of macro '_CONCAT'
       96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:297:37: note: in expansion of macro 'DEVICE_NAME_GET'
      297 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:314:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      314 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    D:/vscode_workspace/at_monitor/src/main.c:154:36: note: in expansion of macro 'DEVICE_DT_GET'
      154 |     const struct device *i2s_dev = DEVICE_DT_GET(I2S_NODE);
          |                                    ^~~~~~~~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:96:41: note: each undeclared identifier is reported only once for each function it appears in
       96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/toolchain/common.h:168:26: note: in definition of macro '_DO_CONCAT'
      168 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:96:33: note: in expansion of macro '_CONCAT'
       96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:297:37: note: in expansion of macro 'DEVICE_NAME_GET'
      297 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/device.h:314:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      314 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    D:/vscode_workspace/at_monitor/src/main.c:154:36: note: in expansion of macro 'DEVICE_DT_GET'
      154 |     const struct device *i2s_dev = DEVICE_DT_GET(I2S_NODE);
          |                                    ^~~~~~~~~~~~~
    In file included from D:/vscode_workspace/at_monitor/src/main.c:25:
    D:/vscode_workspace/at_monitor/src/main.c: In function 'cmd_vol':
    D:/vscode_workspace/at_monitor/src/main.c:287:41: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
      287 |                 _vol_db, (float)_vol_db * 0.5f);
          |                          ~~~~~~~~~~~~~~~^~~~~~
    C:/ncs/v3.2.4/zephyr/include/zephyr/shell/shell.h:1267:47: note: in definition of macro 'shell_print'
     1267 |         shell_fprintf_normal(_sh, _ft "\n", ##__VA_ARGS__)
          |                                               ^~~~~~~~~~~

    In your code, you have "const struct device *i2s_dev = DEVICE_DT_GET(I2S_NODE);". But it seems like either you didn't define I2S_NODE, or that it point to the wrong DTS node. You need to modify the alias in the overlay file to suit your need, and if I2S_NODE is not defied, please define it with the corresponding alias.

    It looks to me that you are not very familiar with Zephyr and devicetree, I would recommend you taking the nRF Connect SDK Fundamental course on DevAcademy. It will help you understand how Zephyr actually works and how you can use devicetree correctly and so on.

    Best regards,

    Simon D-M

Related