Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI088 Streaming timestamps are counting slow.

    Chris89
    Member

    BMI088 Streaming timestamps are counting slow.

    We have implemented the interrupt-streaming-pc example from here https://github.com/BoschSensortec/BMI08x-Sensor-API/blob/master/examples/interrupt_streaming_pc/inte...

    We are using the BMI088 and the version 3 dev board.

    We have both the accelerometer and the gyro configured with ODR's of 200 Hz.

    The timestamps being reported are counting slow, by a factor of ~ 2X. E.g. it takes ~ 10 seconds to record 5 seconds of data with respect to the reported time stamps.

    Example time stamps from a block of 6 valid samples:

    valid sample count: 6

    time stamps: 3073012389
    time stamps: 3073015034
    time stamps: 3073017702
    time stamps: 3073020324
    time stamps: 3073022980
    time stamps: 3073025644

    Time delta between the final two samples is 0.00266, where it should be closer to 0.005 for a sample rate of 200 Hz.

    The timestamps are calculated as: 48bit_timstamp / 30. Is the factor of 30 correct for the BMI088? 

    Something is clearly not being converted correctly as the delta between timestamps are out by a factor of ~2, but it takes approx twice as long to get a 5 second recording implying that the data is sampled at the correct rate, but the timestamps themselves are incorrect. 

    Any idea what we could be doing wrong?

    5 REPLIES 5
    FAE_CA1
    Community Moderator

    Re: BMI088 Streaming timestamps are counting slow.

    Hi,

    Thanks for your inquiry.

    BMI088 time stamp is 24-bit with 39.0625us each digit. It has three bytes 0x1A|0x19|0x18 to get max 16,777,216 LSBs and then it will roll over from 0 again. It is a free runner clock after BMI088 is powered on and it is not related to ODR setting. This is similar to Arduino millis() function. Therefore, after you get delta from the two time stamp values, you can simply multiply the delta by 39.0625us to get the timing.

    Thanks.

    Chris89
    Member

    Re: BMI088 Streaming timestamps are counting slow.

    Thank you for your reponse,

    When looking at the example (see screen shot below from https://github.com/BoschSensortec/BMI08x-Sensor-API/blob/master/examples/interrupt_streaming_pc/inte...), as well as the COINES User Manual Section 5.7 we can see that the packet returned contains a 48-bit time stamp which is enabled using the coines function:  `coines_trigger_timer(COINES_TIMER_START, COINES_TIMESTAMP_ENABLE);` - This allows for 1 timestamp per stream value. It indeed does return timestamps which are monotonically ascending, so the 48 bits do contain something sensible, it's just that we seem to be scaling the output incorrectly. So is the method provided in the example code the correct method to obtain a timestamp per sample in streaming mode?

    Ultimately we wish to stream both accelerometer and gyroscope data with accurate timestamps per sample at 200 Hz, preferably with the accelerometer and gyroscope being synchronised. 

    Chris89_0-1656067827030.png

     

    FAE_CA1
    Community Moderator

    Re: BMI088 Streaming timestamps are counting slow.

    Hi,

    Let me check and then get back to you. Thanks.

    FAE_CA1
    Community Moderator

    Re: BMI088 Streaming timestamps are counting slow.

    Hi,

    The 48-bit time stamps in example code "interrupt_streaming_pc.c" are not from our sensor BMI088. The 48-bit time stamps come from the MCU timer on the APP base board.

    If you would like to get timing value of our sensor, please use function "bmi08a_get_sensor_time" in "bmi08a.c", and each digit corresponds to 39.0625us as described in BMI088 datasheet.

    Thanks.

    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