This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

get devicetree error when I used spi sample code to build my project

I want to use the SPI sample code provided by this website (https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/spi)to build my own project with adxl355.

When I wanted to open nRF Connent SDK project in SEGGER, it failed and came out an error message said that

devicetree error: 'ss-pin' appears in /soc/peripheral@40000000/spi@b000 in nrf9160_pca10090ns.dts.pre.tmp, but is not declared in 'properties:' in C:/Users/User/ncs/v1.2.0/zephyr/dts/bindings\spi\nordic,nrf-spim.yaml
CMake Error at C:/Users/User/ncs/v1.2.0/zephyr/cmake/dts.cmake:210 (message):
new extractor failed with return code: 1
Call Stack (most recent call first):
C:/Users/User/ncs/v1.2.0/zephyr/cmake/app/boilerplate.cmake:46 (include)
CMakeLists.txt:9 (include)

I have no idea how to fix it? Is this problem have to do with different versions between the sample code and SEGGER which I installed before?

  • Hi,

    Rallare's SPI sample is not an official sample, and has not been maintained. It is therefore not compatible with newer NCS versions.

    Amongst the changes done in NCS and Zephyr are changes to the device tree.

    The 'ss-pin' field is no longer used, and you should instead use the 'reg' field of the slave to specify the slaves chip select pin.

    You should also replace the 'spi-max-frequency' field with 'clock-frequency'.

    Best regards,

    Didrik

Related