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

Asset Tracker - adding SPI sensor

Using: Windows 10, nRF Connect v3.5.0, SES v4.52, ncs v1.3.0, zephyr v2.3.0

I have a custom board based on the Thingy91 and the Asset Tracker application. There is also an LIS2DW12 present on SPI.  In prj.conf, I added these lines:

I modified the Thingy91 board file thingy91_nrf9160_common.dts:

In lis2dw12.c, I added these lines to the top:

In SES, it builds quite far, but I get an error:

C:/engr/ncs/v1.3.0/zephyr/drivers/sensor/lis2dw12/lis2dw12.c:227: undefined reference to `lis2dw12_spi_init'

In lis2dw12.c, this section is grayed out:

Which means it never includes the spi.h file.  What am I missing?  Any ideas?

1 2 3