BME280 sample test with nrf5 connect SDK and Visual studio code I2c driver initialization failed chip Id read failed: -5

Hi,

I am doing BME280 sample Application test with nrf connect SDK v2.5.2 but when I am flashing the code, In serial terminal (Putty) I am facing issue Device BME280 is not ready; check the driver Initialization logs for errors and chip_id read failed: -5 and I am facing one warning missing dependencies in .config file DT_HAS_BOSCH_BME280_ENABLED it is enabled and in .prj config file when iam enabling CONFIG_BME280 but at build time it is showing n and missing dependencies warning. So, can you please, help me through it.

I have added .Overlay file as mentioned below.

&i2c0 {
	compatible = "nordic,nrf-twi";
	status = "okay";

	bme280@76 {
		compatible = "bosch,bme280";
		status = "okay";
		label = "BME280";
		reg = <0x76>;
		
	};
};

and I have added.prj file as mentioned below.

CONFIG_PINCTRL=y
CONFIG_ASSERT=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_CONSOLE_SUBSYS=y
CONFIG_CONSOLE_GETCHAR=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_CONSOLE=y

CONFIG_CPLUSPLUS=y
CONFIG_LOG=y
CONFIG_SHELL=y
CONFIG_REBOOT=y
CONFIG_PRINTK=y
CONFIG_PM_DEVICE=y

CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_BME280=y
CONFIG_BOOT_BANNER=n

At this time, I am facing this issue.

[{
	"resource": "/c:/ncs/v2.5.2/zephyr/samples/sensor/bme280/prj.conf",
	"owner": "kconfig0",
	"severity": 4,
	"message": "CONFIG_BME280 was assigned the value y, but got the value n. Missing dependencies:\nDT_HAS_BOSCH_BME280_ENABLED",
	"startLineNumber": 22,
	"startColumn": 1,
	"endLineNumber": 22,
	"endColumn": 14
}]

and In putty serial terminal Iam getting error like this. So, can you please, help me through this.

Thanks & Regards,

Shaik Jareena.

Parents Reply
  • Hi,

    Without making the change by placing twi only it works in v1.6 by adding below mentioned llines of configuration

    &i2c0 {
        status = "okay";
         bme280@76 {
    		compatible = "bosch,bme280";
    		reg = <0x76>;
    		label = "BME280";
    	};
    };

    But in v2.5.2 sdk it is not working.

    And I have tried with register address 0X77 but same error is showing in serial terminal (Putty).

    Thanks & Regards,

    Shaik Jareena.

Children
Related