Bosch Sensortec Community

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

    BSEC default heat duration time for the BME688

    BSEC default heat duration time for the BME688

    MrRoboto
    Member

    After calling the following command from BSEC:

     

    bsec_sensor_control(sensorTS, &sensor_settings); // Retrieve sensor settings to be used in this time instant by calling bsec_sensor_control

     

    I get the following configuration values:

     

    sensor_settings.heater_temperature = 320
    sensor_settings.heating_duration = 197
    sensor_settings.humidity_oversampling = 1
    sensor_settings.pressure_oversampling = 5
    sensor_settings.run_gas = 1
    sensor_settings.temperature_oversampling = 2
    sensor_settings.trigger_measurement = 1

     

    My only concern with these values is the heating_duration which is set at 197 and should be in ms according to the code documentation:

     

    typedef struct
    {
        int64_t next_call;                  /*!< @brief Time stamp of the next call of the sensor_control*/
        uint32_t process_data;              /*!< @brief Bit field describing which data is to be passed to bsec_do_steps() @sa BSEC_PROCESS_GAS, BSEC_PROCESS_TEMPERATURE, BSEC_PROCESS_HUMIDITY, BSEC_PROCESS_PRESSURE */
        uint16_t heater_temperature;        /*!< @brief Heating temperature [degrees Celsius] */
        uint16_t heating_duration;          /*!< @brief Heating duration [ms] */
        uint8_t run_gas;                    /*!< @brief Enable gas measurements [0/1] */
        uint8_t pressure_oversampling;      /*!< @brief Pressure oversampling settings [0-5] */
        uint8_t temperature_oversampling;   /*!< @brief Temperature oversampling settings [0-5] */
        uint8_t humidity_oversampling;      /*!< @brief Humidity oversampling settings [0-5] */
        uint8_t trigger_measurement;        /*!< @brief Trigger a forced measurement with these settings now [0/1] */
    } bsec_bme_settings_t;

     

    This does not make sense to me because it should be impossible to set the heat duration to a value of 197, according to the BME688 documentation:

    BME688 -section 5.3.4.3 .png

    According to the above image, the only possible options are the following

     

    1 to 63 ms @ multiplication of x1 with steps of 1
    4 to 252 ms @ multiplication of x4 with steps of 4
    16 to 1008 ms @ multiplication of x16 with steps of 16
    64 to 4032 ms @ multiplication of x64 with steps of 64

     

    Because of the above information and the fact that 197 is a prime number, it should be impossible to configure the device at 197ms. My hypothesis is the desired configuration is 197 in gas_wait_x register which would equal to a configuration of 320 ms:

     

    197 ==> 0xC5 ==> 1100 0101 ==> Multiplication = 64 and value = 5 ==> 64 * 5 = 320 ms

     

    Is this an error or am I missing something?

    2 REPLIES 2

    BSTRobin
    Community Moderator
    Community Moderator

    Hi MrRoboto,

    Let us check and give you feedback later.

    BSTRobin
    Community Moderator
    Community Moderator

    Hi MrRoboto,

    In function 'set_conf()', which has function 'cal_gas_wait()':

    _thumb_140569.png
    So we took 197ms as an example and calculated this, more details you can refer to this picture.

    222.jpg

    screenshot-2.png
    In short, 197 is composed of factor4 * timer49 (196).

    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