Bosch Sensortec Community

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

    BME680 with BSEC Not seeing valid data

    BME680 with BSEC Not seeing valid data

    BrooklinEmbed
    Member

    I am using the BSEC software with a BME680 on a Microchip SAMD21 processor.    I have the code setup using the example code bsec_iot_example 

    It is initialzed using the code below

    BrooklinEmbed_0-1637091113979.png

    Then run in a loop as in example with code below. 

    BrooklinEmbed_1-1637091184719.png

    I am not seeing any output from the output_ready function.  This function is never called by the BSEC library. 

    Library version is BSEC 1.4.8.0     

    The I2C routines seem to be working fine.   Here are a couple plots of I2C Traffic. 

    BrooklinEmbed_2-1637091314182.png

    Zoomed in you can see when we read the 1D register the new data flag is never set.  And the sensor data is always 80 00 00 meaning its being skipped. 

    BrooklinEmbed_3-1637091373701.png

    What could be the cause of the the system is set to LP config so I should see new data every 3 seconds.... I never see new data.

    Regards

    Frank

     

     

     

     

     

    6 REPLIES 6

    Minhwan
    Community Moderator
    Community Moderator

    Hello, 

     

    It's difficult to investigate your issue with current information, but here is the suggestion for debugging. 

    If output_ready function is not called, root cause of this issue could be related to sleep function in bsec_iot_loop. 

    If you are using LP mode, the sleep should be around 3s, so please check the value of time_stamp_interval_ms line 615 in bsec_integration.c. 

    ( Your get_timestamp_us() function probably doesn't work as we expect)

    Thanks, 

     

    I am using LP mode.  I don't see the sleep as 3s but rather 300msecs.

    What is the output from the get_timestamp_us() function

    1) is it in nsec, micro sec or milli seconds?

    2) is the output a continuous count looping when the int64_t wraps or is it a counter that gets reset after get_timestamp() function is called?

    Thanks

     

    I have time stamp working in LP mode.  I can see the I2C traffic happen every 3seconds. 

    The issue I am seeing is that the num_bsec_inputs variable is always zero. 

    BrooklinEmbed_3-1637595422699.png

     

    I can also see in the I2C traffic that no new data is available.   (it almost looks like the sensors are not enabled)

    BrooklinEmbed_2-1637595215170.png

    If I check the bme680_bsec_update_subscription.. it is run as part of bsec_iot_init and seems to be sucessful. 

    BrooklinEmbed_1-1637594942831.png

    Any Advice please

    zgg
    Long-established Member

    Hi

    get_timestamp_us()  should be in micro-secconds, and it desires the current timestamp of the system which is typically a continous counter that keeps increasing until it rewinds (because of the range of uint64_t)

    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