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!

  • Hi,

    Did you open the existing sample, or did you copy the sample?

    If you copy the sample, see this:

    Jared said:

    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.

    Also, probably better to follow the Devacademy course on SPI as I mentioned in my last reply,

    regards

    Jared 

Related