SPI slave communication

Hello Team,

example: SPI master_slave advanced non -blocking 

i just open nRF connect sdk example in vs code and build it

I am getting below error while build 

Please suggest a steps 

i want to use nRF52840 as a spi slave device

Toolchain: v2.5.2

SDK: v2.5.2

  • i follow the steps as per tutorial.

    the steps are:

    1. create a new application 

    2. copy a sample

    3. select a sample (nrfx_spim non- blocking example) as there is no spi slave examle in sdk

    4. enter application location

    5. create a build configuration (select board - nrf52840dk_52840)

    6. enable sysbuild

    7. build configuration

  • Ok, I totally missed this but this actually a known issue. Let me discuss this internally and come back to you,

    regards

    Jared

  • hello Jared,

    i have created a new custom board and have configured SPI0  in pinctrl-dtsi file. and also included  pinctrl-dtsi file into dts file.

    i want to use SPI0 in slave mode 


    i am  getting configuration incomplete error message may i know which configuration is remian to add here?

    Building led_blink
    west build --build-dir d:/Donaldson/Practice/nRF52840/myApps/led_blink/build d:/Donaldson/Practice/nRF52840/myApps/led_blink
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: D:/Donaldson/Practice/nRF52840/myApps/led_blink
    -- CMake version: 3.20.5
    -- Cache files will be written to: C:/ncs/v2.5.2/zephyr/.cache
    -- Zephyr version: 3.4.99 (C:/ncs/v2.5.2/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
    -- Board: my_custom_board_nrf52840
    -- Found host-tools: zephyr 0.16.1 (C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.1 (C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk)
    -- Found BOARD.dts: D:/Donaldson/Practice/Embedded_Gateway_custom_board/boards/arm/my_custom_board_nrf52840/my_custom_board_nrf52840.dts
    devicetree error: 'low-power_enable' appears in /pin-controller/spi0_sleep/group1 in D:/Donaldson/Practice/nRF52840/myApps/led_blink/build/zephyr/zephyr.dts.pre, but is not declared in 'properties:' in C:/ncs/v2.5.2/zephyr/dts/bindings\pinctrl\nordic,nrf-pinctrl.yaml
    -- In: D:/Donaldson/Practice/nRF52840/myApps/led_blink/build/zephyr, command: C:/ncs/toolchains/c57af46cb7/opt/bin/python.exe;C:/ncs/v2.5.2/zephyr/scripts/dts/gen_defines.py;--dts;D:/Donaldson/Practice/nRF52840/myApps/led_blink/build/zephyr/zephyr.dts.pre;--dtc-flags;'';--bindings-dirs;C:/ncs/v2.5.2/nrf/dts/bindings;C:/ncs/v2.5.2/zephyr/dts/bindings;--header-out;D:/Donaldson/Practice/nRF52840/myApps/led_blink/build/zephyr/include/generated/devicetree_generated.h.new;--dts-out;D:/Donaldson/Practice/nRF52840/myApps/led_blink/build/zephyr/zephyr.dts.new;--edt-pickle-out;D:/Donaldson/Practice/nRF52840/myApps/led_blink/build/zephyr/edt.pickle;--vendor-prefixes;C:/ncs/v2.5.2/nrf/dts/bindings/vendor-prefixes.txt;--vendor-prefixes;C:/ncs/v2.5.2/zephyr/dts/bindings/vendor-prefixes.txt
    CMake Error at C:/ncs/v2.5.2/zephyr/cmake/modules/dts.cmake:279 (message):
      gen_defines.py failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v2.5.2/zephyr/cmake/modules/zephyr_default.cmake:129 (include)
      C:/ncs/v2.5.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.5.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
      CMakeLists.txt:2 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/c57af46cb7/opt/bin/python.exe '-Bd:\Donaldson\Practice\nRF52840\myApps\led_blink\build' -GNinja '-Sd:\Donaldson\Practice\nRF52840\myApps\led_blink'
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 
    

  • Hi,

    To answer your original problem. It's an issue because the #include statement in the overlay use relative paths. The solution is to manually change it so that it points to the common folder in your sample folder. For example, when you create a new sample based on the mentioned sample it will also create a "common" folder. The path in the overlay should point to that folder. 

    regards

    Jared

    PRAVIN_@yash said:

    hello Jared,

    i have created a new custom board and have configured SPI0  in pinctrl-dtsi file. and also included  pinctrl-dtsi file into dts file.

    i want to use SPI0 in slave mode 


    i am  getting configuration incomplete error message may i know which configuration is remian to add here?

    This is a complete new issue, please create a new ticket for it.

  • I am having the same problem with SDK version 2.6.1 using the connected steps in vscode, how do I solve this problem?

Related