Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMI088 FIFO synchronization with external interrupts

    BMI088 FIFO synchronization with external interrupts

    michap
    New Poster

    Hi,

    I have an external pulse on INT4 (Gyro) of a BMI088.

    I would like to "see" this pulse in the gyro data as descibred in the FIFO usage application note.

    Is there any example code that implements the description in the note already?

    I don't find any in the Sensor API repository: https://github.com/boschsensortec/BMI08x_SensorAPI 

    Best, Michael

    13 REPLIES 13

    Hi FAE_CA1,

    thank you very much for the example code!

    I applied it to my setup and I can now read tagged data from the FIFO! That's nice.

    Under 4.2, I read that the tag should be available in the data readout registers as well.

    michap_0-1715677086365.png

    I would call bmi08g_get_data(&bmi08_gyro, &bmi08dev) like so:

    struct bmi08_sensor_data gyroData;

    rslt = bmi08g_get_data(&bmi08_gyro, &bmi08dev);
    bmi08_error_codes_print_result(
    "bmi08g_get_data", rslt);

    printf("GYR %5d, %5d, %5d, %5d\n",
    bmi08_gyro->x,
    bmi08_gyro->y,
    bmi08_gyro->z,
    bmi08_gyro->z & 0x0001
    );

    but it appears that the data does not reflect the external pulse.

    Am I getting something wrong?

     

    Moreover, from the section 4.2 I get that the tag information should be available in the data readout registers already. Do I actually need to setup FIFO mode then?

    What is the minimal configuration to read tag information in the LSB of the gyro z axis data?

     

    Thank you very much for your support!

     

     

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    BMI088 gyro data registers only contain x/y/z 16-bit raw data without interrupt tag information. The interrupt tag information is only available at the least significant bit (LSB) of z axis data. This means that z axis raw data in FIFO becomes 15-bit and the LSB is given to INT3 or INT4 interrupt tag info. If possible, could you please attach the app note of "BMI08x FIFO usage" here?

    Below is the comments to your questions.

    -Am I getting something wrong?

    Please the above. BMI088 gyro registers #0x02 to #0x07 are showing the measurements of gyro X/Y/Z, no reflection of interrupt-tag. And what's happening inside FIFO is, FIFO stores the high 7th bit from register#0x06 and all bit from #0x06, stores the level of specific interrupt pin to bit#0 of gyro Z measurement inside FIFO. So only FIFO would reflect the interrupt tag.

    -Do I actually need to setup FIFO mode then?
    Yes, if you want to use interrupt tag feature.

    -What is the minimal configuration to read tag information in the LSB of the gyro z axis data?
    The sample code is the minimal configuration. If not, please explain a little more about the meaning of "minimal configuration ...".

    Thanks.

    Hi,

    thank you.

    >> BMI088 gyro data registers only contain x/y/z 16-bit raw data without interrupt tag information. 

    Pretty clear now. I was missing that clear statement in the app note. This sentence under 4.2. in fact made me think I can have the tag without the FIFO:
    "... Thus, all configuration settings apply to the FIFO data as well as the data readout registers. ..."

    >> If possible, could you please attach the app note of "BMI08x FIFO usage" here?

    Sure: https://www.bosch-sensortec.com/media/boschsensortec/downloads/application_notes_1/bst-mis-an005.pdf

    and in the attach.

    >> The sample code is the minimal configuration. 

    Yes, clear now. My bad on interpreting the passage under 4.2 in the app note bst-mis-an005.pdf .

     

    I have a related topic, I think it still fits the context here:

    I would now like to read acc and gyro data in sync while the gyro data holds the external interrupt tag and the accelerometer comes with the sensor time.

    There is this app note 006 by BOSCH Sensortec that explains the sync between gyro and acc very well: https://www.bosch-sensortec.com/media/boschsensortec/downloads/application_notes_1/bst-mis-an006.pdf   or see the attach.

    (It names a file DataSync.md for further reading that does no longer exist in the BMI08x-Sensor-API repo, though. Maybe you can check.)

    My question however is: I would now need to read FIFO data instead of data registers or general purpose data registers for the acc + timestamp and in particular tagged gyro data.

    --> Will those data in the FIFOs be in sync as well?

    The app note 006 doesn't mention FIFO at all.

    Thank you for you support!

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    For the data sync feature, both Acc and Gyro data would be from data registers rather than their independent FIFOs. So what you expect may not be doable.

    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