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,

    I have changed from twi to twim compatible = "nordic,nrf-twim"; at that time I am facing errors and with version v1.6.0 in nrf connect SDK and with vs code it is working but in v2.5.2 it is not working and same issue iam getting in serial terminal.

    [00:00:00.751,434] <err> i2c_nrfx_twi: Error on I2C line occurred for message 0
    [00:00:00.751,525] <dbg> BME280: bme280_chip_init: ID read failed: -5
    *** Booting nRF Connect SDK v2.5.2 ***
    
    Error: Device "BME280" is not ready; check the driver initialization logs for errors.
    
    
    
    

    Thanks,

    Shaik Jareena.

Children
Related