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

    Unfortunately it is difficult to understand the root cause of this issue based on the provided information. Could you please share some more details about your difficulties? Is no data printed in your terminal? Do you see any error/warning message from any BSEC function call? Could you determine if the code is blocked or stops in any specific location in your code? Did you make any changes to the original sample code?

    Sample code without any modification. 
    No BSEC Errors or Warnings.
    The code works without blocked.

    My debug inject:

    static void bme680_bsec_read_data(int64_t time_stamp_trigger, bsec_input_t *inputs, uint8_t *num_bsec_inputs,
    int32_t bsec_process_data)
    {
    static struct bme680_field_data data;
    int8_t bme680_status = BME680_OK;

    /* We only have to read data if the previous call the bsec_sensor_control() actually asked for it */
    if (bsec_process_data)
    {
    bme680_status = bme680_get_sensor_data(&data, &bme680_g);
    print("%02X\n",data.status); -> terminal: 0x00
    ....

    full terminal log:

    run_gas:1,heater_temp:320,heater_dur:150

    BME680 INIT Start
    I2C W $E0 <= 0xB6,
    I2C R $D0 => 0x61,
    I2C R $89 => 0x00,0x45,0x66,0x03,0xE0,0x80,0x88,0x40,0xD7,0x58,0x00,0x11,0x01,0x30,0xFF,0x01,0x1E,0x00,0x00,0x08,0x01,0x00,0xF0,0x1E,0x00,
    I2C R $E1 => 0x3E,0x06,0x24,0x00,0x2D,0x14,0x78,0x9C,0x40,0x66,0x1A,0xE0,0xC0,0x12,0x05,0x00,
    I2C R $02 => 0x16,
    I2C R $00 => 0x20,
    I2C R $04 => 0x13,
    BME680 OK
    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
    bme680_set_sensor_mode start
    I2C R $74 => 0x54,
    I2C W $74 <= 0x55,
    bme680_set_sensor_mode end
    Waiting (ms):193
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,

     

    Thank you.

     

    handytech
    Community Moderator
    Community Moderator

    Could you please also store and print the value returned by bsec_sensor_control(), as well as the value of bme680_status after each step in bme680_bsec_trigger_measurement()?

    BME680 INIT Start
    I2C W $E0 <= 0xB6,
    I2C R $D0 => 0x61,
    I2C R $89 => 0x00,0x45,0x66,0x03,0xE0,0x80,0x88,0x40,0xD7,0x58,0x00,0x11,0x01,0x30,0xFF,0x01,0x1E,0x00,0x00,0x08,0x01,0x00,0xF0,0x1E,0x00,
    I2C R $E1 => 0x3E,0x06,0x24,0x00,0x2D,0x14,0x78,0x9C,0x40,0x66,0x1A,0xE0,0xC0,0x12,0x05,0x00,
    I2C R $02 => 0x16,
    I2C R $00 => 0x20,
    I2C R $04 => 0x13,
    BME680 OK
    bsec_sensor_control result:0
    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 result:0
    I2C R $74 => 0x54,
    I2C W $74 <= 0x55,
    bme680_set_sensor_mode result:0
    I2C R $74 => 0x00,
    bme680_get_sensor_mode result:0
    bme680_bsec_trigger_measurement bme680_status:0
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,
    I2C R $1D => 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x04,

    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