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

nRF9160 DK I2C only receives the first byte with BME280

I am trying to read temperature, pressure, and humidity data from an Adafruit BME280 sensor using the nRF9160 DK.  The communication protocol that I am using is I2C and I am reading the data with the Zephyr RTOS function i2c_burst_read().  The problem that I am running into is that the only data that is being transferred is the first bit in the first byte of each measurement.  The screenshot shows the lines of code that I am using to implement the I2C data transfer and the output of the data transfer.  On the top right, in the watch window, the variable reg_data is where the transferred data is supposed to go and it can be seen that the value is 0x80080080.  Is there any idea what could possibly be going wrong?

  • I have a similar error:

    2> In file included from C:/nordicsdk/ncs/zephyr/include/drivers/sensor.h:23:0,
    2> from C:/nordicsdk/ncs/zephyr/drivers/sensor/bme280/bme280.c:11:
    2> C:/nordicsdk/ncs/zephyr/drivers/sensor/bme280/bme280.c:384:29: error: 'DT_INST_0_BOSCH_BME280_LABEL' undeclared here (not in a function); did you mean 'DT_INST_0_SOC_NV_FLASH_LABEL'?
    2> C:/nordicsdk/ncs/zephyr/include/device.h:107:11: note: in definition of macro 'DEVICE_AND_API_INIT'
    Build failed

    I think that I used the same procedure

  • Hi, .

    Could you please open a new ticket?

    At the moment, when a ticket has a "verified answer", it does not appear back in our list of open tickets, so it is hard for us to keep track.

    Also, in your ticket, please provide your overlay file and configuration file to help us identify your problem.

    Best regards,

    Didrik

Related