Bosch Sensortec Community

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

    bme680 timestamp

    bme680 timestamp

    1uisvalseca
    Member

    Hello, I have a problem, I am not sure what the meaning of timestamp is here, because when I run the program, in bsc_integration.c if I enter bsec_sencor_control (...) with any timestamp value, it only exits this function with the bsec_status = BESC_OK the first time I enter after bsec_iot_init (...), the next times I enter the function bsec_sencor_control (...) exits with bsec_status = BSEC_W_SC_CALL_TIMING_VIOLATION. Can someone help me understand what value I have to return in get_timestamp_us () for everything to work ok. Waiting for an answer, best regards, Luis Valseca

    5 REPLIES 5

    Minhwan
    Community Moderator
    Community Moderator

    Hello 1uisvalseca, 

     

    You have to get your system time from get_timestamp_us.

    For example, if your system running time is 20s, you should get 20,000,000 (us). 

    And then, your system running time is 40s, you should get 40,000,000 (us). 

    We are using this value to sleep our process.

    Thanks, 

     

    Hi Minhwan,

    I am using the LP configuration, that is, 3 seconds sleeping, but with whatever value I get from get_timestamp_us (), when I first enter bsec_sensor_control (time_stamp, & sensor_settings); the status is correct: BSEC_OK, but when I enter the second time the status it returns is: BSEC_W_SC_CALL_TIMING_VIOLATION.
    i am using microcontroller CC1310 of Texas Instruments and the editor and compiler is the CCS (Code Composer Studio).
    What value in microseconds should get_timestamp_us () return when I am using the LP setting of 3 seconds?
    Awaiting replay, best regards
    Luis Valseca

     

    Minhwan
    Community Moderator
    Community Moderator

    Hello, 

     

    As I said, get_timestamp_us () should generate system running time. 

    For example, if your system is running for 10s, it should generate 10,000,000. 

    Therefore, if CC1310 doesn't support that kind of system time, good thing is you check beginning of your source code, and its time is 0s. 

    Then, you can get next time in get_timestamp_us after that point. 

    Thanks, 

    I still don't understand what happens, if I exit the get_timestamp_us () function with a timestamp of 200 milliseconds, that is, 200,000 microseconds, I multiply by 1000 to convert into nanoseconds. Now I enter the function ret.bsec_status = bsec_sensor_control (time_stamp, & sensor_settings); for the first time. I returned
    bsec_status = BSEC_OK, but the following times it returns me
    bsec_status = BSEC_W_SC_CALL_TIMING_VIOLATION. I ask again, with what value should I enter bsec_sensor_control () so that it always returns bsec_status = BSEC_OK.?
    pleasde, help
    Luis Valseca

    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