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

nrf9160-DK SPI from BME280 sensor config issue

I am on nrfConnect v3.6 trying to build an SPI test using the command line (west)

I get this error:

```

error: SPI_3_NRF_SPIM (defined at drivers/spi/Kconfig.nrfx:133) is assigned in a configuration file,

but is not directly user-configurable (has no prompt). It gets its value indirectly from other

symbols. See docs.zephyrproject.org/.../CONFIG_SPI_3_NRF_SPIM.html

and/or look up SPI_3_NRF_SPIM in the menuconfig/guiconfig interface. The Application Development

Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual

might be helpful too.

CMake Error at ~/Nordic/nrfsrc/ncs/zephyr/cmake/kconfig.cmake:239

```

My prj.conf:

```

CONFIG_SPI=y
CONFIG_SPI_3=y
CONFIG_SPI_3_NRF_SPIM=y
CONFIG_SPI_3=y
CONFIG_SPI_NRFX=y
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_SENSOR=y

```

My Kconfig:

```

# Copyright (c) 2020, Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config LOG
default y

config LOG_PRINTK
default y

config SENSOR_LOG_LEVEL
default 4

# Workaround for not being able to have commas in macro arguments
DT_COMPAT_BOSCH_BME280 := bosch,bme280

# Enable SPI support by default if there are any BME280 sensors
# on a SPI bus.
config SPI
default $(dt_compat_on_bus,$(DT_COMPAT_BOSCH_BME280),spi)

# Enable I2C support by default if there are any BME280 sensors
# on an I2C bus.
config I2C
default $(dt_compat_on_bus,$(DT_COMPAT_BOSCH_BME280),i2c)

source "Kconfig.zephyr"

```

My nrf9160dk_nrf9160ns.overlays

```

&spi3 {
status = "ok";
sck-pin = <10>;
mosi-pin = <11>;
miso-pin = <12>;
#ss-pin = <13>;
#spi-max-frequency = <4000000>;
};

&uart3 {
status = "disabled";
};

```

Sadly, the references in the error message have not helped me much.

Any suggestions pls.

Related