Bosch Sensortec Community

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

    BME680 BSEC reasonable flash save_state rate

    BME680 BSEC reasonable flash save_state rate

    kevyk
    Established Member

    Hi.

    In the sample given in implementing the BSEC, when they call bme680_bsec_loop, they use a save_data-to-flash rate of 10,000 (every 500 minutes). Isn't that too infrequent? Shouldn't it be saved with more frequency, say perhaps every hour or even every 5 minutes or so?

    Thanks,

    Kevin

    3 REPLIES 3

    handytech
    Community Moderator
    Community Moderator

    The value in the example code is provided for reference only and can be fine-tuned to your needs, the most important is that you weight the impact of missing in this example 500 minutes of history to the overall performance in your specific application, and tweak it accordingly.

    kevyk
    Established Member

    Thanks Handytech.

    The save rate is only for the next power on, right? The data is not saved and loaded otherwise, correct?

    What are the advantages and disadvantages of having a more frequent save_data rate? Why wouldn't you choose say every 5 minutes or ever hour or something?

    Thanks!

    handytech
    Community Moderator
    Community Moderator

    @kevyk wrote:

    The save rate is only for the next power on, right? The data is not saved and loaded otherwise, correct?


    Power cycles is typically when you would expect/want to reload the state. In some applications the state of BSEC's internal variables in RAM cannot be saved when entering deep sleep (e.g. of the MCU). Is such a case it would be mandatory to save/restore BSEC's state for every sample.


    @kevyk wrote:

    What are the advantages and disadvantages of having a more frequent save_data rate? Why wouldn't you choose say every 5 minutes or ever hour or something?


    For the sake of BSEC, the impact on the application was described in my previous post. In practice you may need to consider other HW requirements, such as the number of write cycles of your non-volatile memory (e.g. already over 100k times per year if saved every 5 minutes), etc.

    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