Bosch Sensortec Community

    BME680, CHIP ID/ T/H/P read OK. but, Gas value is always 0xFFEF, reg_0x2A =0xff, reg_0x2B = 0xef.


    BME680, CHIP ID/ T/H/P read OK. but, Gas value is always 0xFFEF, reg_0x2A =0xff, reg_0x2B = 0xef.

    BME680 is used now.

    CHIP ID/ T/H/P are read OK.

    but, Gas value is always 0x000000B1, reg_0x2A =0xff, reg_0x2B = 0xef.

    using the API file:


    * File bme680.c
    * @date 19 Jun 2018
    * @version 3.5.9

    Can you give me some suggestions?


    Tags (1)
    2 REPLIES 2

    Re: BME680, CHIP ID/ T/H/P read OK. but, Gas value is always 0xFFEF, reg_0x2A =0xff, reg_0x2B = 0xe



      uint8_t set_required_settings;
        /* Set the temperature, pressure and humidity settings */
        gas_sensor.tph_sett.os_hum = BME680_OS_2X;
        gas_sensor.tph_sett.os_pres = BME680_OS_4X;
        gas_sensor.tph_sett.os_temp = BME680_OS_8X;
        gas_sensor.tph_sett.filter = BME680_FILTER_SIZE_3;
        /* Set the remaining gas sensor settings and link the heating profile */
        gas_sensor.gas_sett.run_gas = BME680_ENABLE_GAS_MEAS;
        /* Create a ramp heat waveform in 3 steps */
        gas_sensor.gas_sett.heatr_temp = 320; /* degree Celsius */
        gas_sensor.gas_sett.heatr_dur = 150; /* milliseconds */
        /* Select the power mode */
        /* Must be set before writing the sensor configuration */
        gas_sensor.power_mode = BME680_FORCED_MODE; 
        /* Set the required sensor settings needed */
        set_required_settings = BME680_OST_SEL | BME680_OSP_SEL | BME680_OSH_SEL | BME680_FILTER_SEL 
            | BME680_GAS_SENSOR_SEL;
        /* Set the desired sensor configuration */
        rslt = bme680_set_sensor_settings(set_required_settings,&gas_sensor);
        /* Set the power mode */
        rslt = bme680_set_sensor_mode(&gas_sensor);
    Community Moderator

    Re: BME680, CHIP ID/ T/H/P read OK. but, Gas value is always 0xFFEF, reg_0x2A =0xff, reg_0x2B = 0xe

    Unfortunately some information is missing to understand your issue:

    • Can you confirm that your read/write transactions work fine? For examples, is the chip ID correct? Are temperature/pressure/humidity outputs relevant?
    • How are you using the snippet that you've shared? This code alone only triggers one measurements then the sensor goes back to standby mode. Unless it is called repeatably, outputs are not expected to change.
    • Without full ADC and trimming values, we cannot make sense of raw register values. If the sensor API is otherwise working, you could directly share raw gas values in ohms.
    • Are you using a BME680 shuttle board? Or a custom-made PCB?
    • Is the resistance value sometimes changing at all (for e.g. when your program starts running) then gets stuck after some time, or is it never changing at all?