Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BMI088 Streaming timestamps are counting slow.

    BMI088 Streaming timestamps are counting slow.


    We have implemented the interrupt-streaming-pc example from here

    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?

    6 REPLIES 6

    Thank you for the response. Unfortunately "bmi08a_get_sensor_time" is not accurate enough to provide precise time stamps per sample. 

    Ideally we want to use the FIFO to stream data at 200 Hz, with a timestamp provided for each sample where there is no variance on the sampling interval. This should be achievable as a 200 Hz ODR would request 1 sample every 128 ticks of the 24 bit clock. 

    Any pointers on the best way to achieve this would be appreciated.

    Community Moderator
    Community Moderator


    Could you please let us know a little more about your application? Is it a drone or robot application?

    Unfortunately it is not possible for BMI088 to fill data into FIFO at exact 200Hz, because BMI088 gyro has typical ODR tolerance of +/-0.3%.  BMI088 fills data into FIFO based on ODR. At 200Hz ODR, each BMI088 gyro will have actual ODR from 199.4Hz to 200.6Hz. What you could do is use your accurate crystal for your MCU to find out the relationship to each BMI088's gyro ODR and then you could do some kind of compensation.