Bosch Sensortec Community

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

    BSEC BME680 measures 10 times then stops.

    acanthe
    Member

    Re: BSEC BME680 measures 10 times then stops.

    Does your clock time have 32 bits output or 64 bits? 

    its 32 bits -> type is uint32_t

    get_timestamp_us is micro second unit. Why did you multiply 1000000 and devide clock_second? 

    the output of clock_time is the system time in ticks, not ms or us which is why I've had to divide by CLOCK_SECOND which converts to s, and multiply before the divide to not lose resolution and get us.

    Minhwan
    Community Moderator

    Re: BSEC BME680 measures 10 times then stops.

    Hello acanthe, 

     

    I understood. 

    If you don't have any system clock which is 64 bits, need to make it your own timestamp. 

    Since, BSEC library checks it how long it BME688 can sleep. 

    Thanks, 

    acanthe
    Member

    Re: BSEC BME680 measures 10 times then stops.

    Hi,

    I managed to fix the problem, the cause was that I had divided by 128 to get the clock in seconds BEFORE i cast to int64_t. Casting afterwards allowed the clock the manage its max value as it normally would do. In other words, because the clock never reached the max value of a uint32_t the clock never knew it had reset.

    The sensor takes 10 or so minutes but it seems to be getting accuracy readings now (1/2/3) which is great.

    Thanks for your help Minhwan walking through the steps.

    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