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

BME680 sample on nRF5340

Hi, 

I am trying to interface a BME680 sensor with my nRF5340 DK. I am trying to get the following sample to run (I left everything default): https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/sensor/bme680/README.html

When building I get the following error:

'DT_N_INST_0_bosch_bme680_P_label' undeclared (first use in this function)

Is there anything specific I need to configure? I'm not sure what to do, this is quite new to me.

Kind regards,

Stefan

Parents Reply
  • That indeed did the trick. I thought the 'clean solution' command removed that folder but I guess it didn't do it (completely). 

    Now for the next challenge. I now see the following output looping:

    *** Booting Zephyr OS build v2.4.99-ncs1  ***
    Device (nil) name is <
    *** Booting Zephyr OS build v2.4.99-ncs1  ***
    Device (nil) name is <
    *** Booting Zephyr OS build v2.4.99-ncs1  ***
    Device (nil) name is <

    It seems like it is not reading the overlay file properly? And then it reboots with no error.

    These are the contents of the overlay file:

    nrf5340dk_nrf5340_cpuapp.overlay
    
    /*
     * Copyright (c) 2020, Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: Apache-2.0
     */
    
    &i2c1 {
    	compatible = "nordic,nrf-twim";
    	status = "okay";
    	sda-pin = < 30 >; //P0.30
    	scl-pin = < 31 >; //P0.31
        clock-frequency = <I2C_BITRATE_STANDARD>; 
    	
    	bme680@76 {
    		compatible = "bosch,bme680";
    		reg = <0x76>;
    		label = "BME680";
    	};
    };

Children
Related