Help Needed: SPI Communication Between Two nRF5340 DK Boards (SDK v2.9.1

Hello community,

I'm currently working on setting up SPI communication between two nRF5340 DK boards, but I'm running into several issues.

  1. SDK Version 2.9.1: I couldn’t find any pre-existing SPI sample for this version. Is there an official example or a basic project I can use as a starting point?

  2. Creating a new SPI application:

    • I modified the prj.conf file to enable SPI functionality.
    • I also created a nrf5340dk_nrf5340_cpuapp.overlay file to configure the pins.
    • However, when I try to build the project, I get the following errors:
CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message)
CMake Error at C:/ncs/v2.9.1/zephyr/cmake/modules/dts.cmake:295 (execute_process)
CMake Error at C:/ncs/v2.9.1/zephyr/cmake/modules/dts.cmake:339 (message)
CMake Error at C:/ncs/v2.9.1/zephyr/cmake/modules/extensions.cmake:2993 (file)
Kconfig Language Server cannot start for build 'build'. Try rebuilding or do the pristine build to fix this issue.

I’m not sure what’s causing these errors. Could it be a misconfiguration in the overlay file or something else?

If anyone could explain how to properly create a working SPI application between two nRF5340 DK boards, or point me to a tutorial or example, I would be very grateful.

Thanks in advance for your help!

Parents Reply Children
  • I used version 3.0.0 during the build process with the target board nrf5340dk/nrf5340/cpuapp, using the default Devicetree overlay (board/nrf5340dk/nrf5340/cpuapp.overlay). However, the issue still persists.

  • I used version 3.0.0 during the build process with the target board nrf5340dk/nrf5340/cpuapp, using the default Devicetree overlay (board/nrf5340dk/nrf5340/cpuapp.overlay). However, the issue still persists.

  • Hi,

    I'm assuming you tried to copy the sample?

    Unfortunately, the samples in the nrfx folder won't build outside of its folder without doing some modifications to it. That is due some dependencies of CMAKELIST.txt file. The easiest for testing this sample would be to either just build the application where it is, or start a new project and just copy main.c and add

    CONFIG_NRFX_SPIM1=y to the project config.
     
    Note that the samples are not using any Zephyr drivers. If you are planning to use this in a project then the example in our Devacademy is probably the best start. There we show you how to use the Zephyr API for SPI.
    best regards
    Jared 
Related