Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    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.

    eugenyd
    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 1.4.7.4.

     

    Thank you.

    5 REPLIES 5

    handytech
    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.

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist