Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BME680 BSEC not found new data with gas sensor enable in LP or ULP mode.

    BME680 BSEC not found new data with gas sensor enable in LP or ULP mode.

    New Poster

    BME680 BSEC ARM Cortex-MF4 IAR:  not found new data if gas sensor enable in LP or ULP mode.


    ret = bsec_iot_init(BSEC_SAMPLE_RATE_LP, 0.0f, bt_bme680_bus_write , bt_bme680_bus_read, sys_cmd_delay_ms, state_load, config_load);

    bsec_iot_loop(sys_cmd_delay_ms, sys_get_timestamp_us, output_ready, state_save, 100);


    if sensor_settings.run_gas = BME680_DISABLE_GAS_MEAS; get new data but only: T;H;P

    BSEC version


    Thank you.

    5 REPLIES 5

    Community Moderator
    Community Moderator

    I just reviewed your i2c traces, and found some differences to the example code.

    @eugenyd wrote:

    bme680_set_sensor_settings start
    I2C W $5A <= 0x70, 0x64, 0x65,
    I2C R $74 => 0x00,
    I2C R $75 => 0x00,
    I2C R $70 => 0x00,
    I2C R $74 => 0x00,
    I2C R $72 => 0x00,
    I2C R $71 => 0x00,
    I2C W $75 <= 0x08, 0x70, 0x00, 0x74, 0x54, 0x72, 0x01, 0x71, 0x10,
    bme680_set_sensor_settings end

    This sequence indicates that BME680_FILTER_SEL and BME680_HCNTRL_SEL were set (respectively configured to BME680_FILTER_SIZE_3 and BME680_ENABLE_HEATER?). Although these should not cause the described error, this is not the default configuration.

    @eugenyd wrote:

    bme680_set_sensor_mode start
    I2C R $74 => 0x54,
    I2C W $74 <= 0x55,
    bme680_set_sensor_mode end
    Waiting (ms):193

    The value of 193ms looks suspect to me here. Is this the period on the bus, or the output of bme680_get_profile_dur()? With the default configuration in my setup, bme680_get_profile_dur() expects a delay of ~240ms. An incorrect delay like 193ms would trigger the following while() loop, making sure the measurement was really completed before reading out the data!

    Note that forcing the delay period to 193ms AND skipping the said loop will cause a similar output as you described (no relevant data from the register map). Again a mechanism is the official sensor API should kick-in and poll again the data registers (up to 10 times) until valid new data is read-out. Therefore my project was able to continue without any error/issue.