Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BMI085 FIFO tag application


    BMI085 FIFO tag application


    I'm trying to use the FIFO tag feature for the BMI085 IMU in my application, as described in this document:

    Below is the code snippet which should set the interrupt INT1 pin as input:



    struct bmi08x_accel_int_channel_cfg accel_fifo_int = {0};
    int8_t status;
    accel_fifo_int.int_channel = BMI08X_INT_CHANNEL_1;
    accel_fifo_int.int_type = BMI08X_ACCEL_SYNC_INPUT;
    accel_fifo_int.int_pin_cfg.output_mode = BMI08X_INT_MODE_PUSH_PULL;
    accel_fifo_int.int_pin_cfg.lvl = BMI08X_INT_ACTIVE_HIGH;
    accel_fifo_int.int_pin_cfg.enable_int_pin = BMI08X_ENABLE;
    status = bmi08a_set_int_config(&accel_fifo_int, bmi08x_dev);



    For the int_type field I choose the BMI08X_ACCEL_SYNC_INPUT because all other enums are used for the output configuration. The same configuration I've used is also used in the read_synchronized_data_mcu.c official example ( 

    After the configuration, I read the register FIFO_CONFIG_1 (address 0x49) and it's state is: 0x58, which seems to be correct:

    • bit 6 is set to 1, which means accelerometer data storing in the FIFO is enables,
    • bit 4 is set to 1, which is correct according to the datasheet where is it claimed that this bit must always equal to 1
    • bit 3 is set to 1, which means that interrupt event capture is enabled for the interrupt pin INT1
    • bit 2 is set to 0, which means that interrupt event capture is disabled for the interrupt pin INT2 (this is correct according to the configuration I made)
    • other bits are reserved and to 0, which is correct according to the datasheet


    Before call to the bmi08a_read_fifo_data function is made, I set the GPIO pin from the MCU which is connected to INT1 pin on the IMU to the HIGH (1) state for 1 ms and then to the LOW state (0). Only after that pulse on the INT1 line, I call the bmi08a_read_fifo_data function.

    Then, when the internal (static) driver function extract_acc_header_mode is called, I check the extracted header frame to see if the generated pulse event is recorded and it's state is always equal to 0x84 (0b 1000 0100), which according to the section 3.2.1 Acceleration sensor data frame means the following:

    • bits 7 to 2 (1000 01) is the data frame identifier - the read value from my application matches the value specified in the datasheet
    • bit 1 is set to 0, which represents the recorded event on the interrupt pin INT2 - this is as expected because this pin is not used in my application
    • bit 0 is set to 0, which represents the recorded event on the interrupt pin INT1 - this is NOT as expected, because I assert the signal on the this pin, but is obviously not recorded

    I've also tried to keep the INT1 high all the time, but the result is the same, i.e. bit 0 (INT1 tag) in accelerometer header frame is always set to 0.


    Any help would be appreciated.


    P.S. A suggestion from my side would be to add the FIFO tag application example in the list of the provided examples on Github (


    Best regards,


    3 REPLIES 3
    Community Moderator

    Re: BMI085 FIFO tag application

    Hi dcindric28,

    Do you want to read FIFO data or the synchronous data of accel and gyro?

    If you just to read FIFO data, you need to set int_type is set to BMI08X_ACCEL_INT_FIFO_WM.

    If you want to synchronize accel and gyro data, refer to the example read_synchronized_data_mcu.c to read the synchronization data.

    If you run read_synchronized_data_mcu.c and also read FIFO data again. How do you synchronize accel and gyro data in FIFO? read_synchronized_data_mcu.c has demonstrated reading synchronous data.


    Re: BMI085 FIFO tag application

    Hi BSTRobin,

    Thank you for your response, but I was not referring to the readout of the synchronized accelerometer and gyroscope data and I'm familiar with that example. To further clarify, I'm interested in the tag application, mentioned in sections 3.1.3 and 4.1.2 of the BMI08X FIFO Usage application note:

    I want to have tagged accelerometer and gyroscope data based on the state of interrupt pins. For example, if I configure the INT1 pin, which is tied to the accelerometer, and the INT3 pin, which is internally tied to the gyroscope, as input pins and accordingly set the bit 3 in the FIFO_CONFIG_1 register (address 0x49) and bit 5 in the register FIFO_EXT_INT_S (0x34) to logical 1, the tag mode should be enabled. To cite the application note:

    Section 3.1.3 FIFO synchronization with external interrupts

    If the INT1 and/or INT2 pin is configured as input pin (by setting int2_io in register INT2_IO_CTRL
    and/or setting int1_io in register INT1_IO_CTRL), signals on these pins can also be recorded in
    the FIFO, and the frames are “tagged” accordingly. Therefore the pins need to be activated for
    FIFO recording in register FIFO_CONFIG_1 (see 3.5.7).


    Section 4.1.2 FIFO synchronization with external interrupts (tag application) for the gyroscope

    ...In order to enable the tag mode, bit 5 must be set in register 0x34 (see 0). The pin can be chosen
    in the same register, bit 4. The remaining 15 bits of the z-axis gyroscope data keep the same meaning
    as in standard mode.
    Once the pin, which is configured for the tag mode, is set to high level, the next FIFO word will be
    marked with a tag (z-axis LSB = 1). While pin is kept at a high level, the corresponding FIFO
    words will continuously be tagged. After the pin is reset to low level, the immediate next FIFO
    word could still be tagged, and only after this word, the next tag will be reset (z-axis LSB=0).

    I've implemented all of the above-mentioned procedures in my code (as described in my previous post) and checked the state of all relevant registers, which showed that all the bits are set correctly according to the application note I'm referring to, but without any success - bit 0 (INT1 tag) in accelerometer header frame is always set to 0, independent of the state of INT1 pin, and gyroscope data sometimes has LSB equal 0 even if the INT3 is active.

    Examples and any additional help for the tag mode would be highly appreciated since this is a deal breaker for the application I'm developing (100+ units).

    Best regards,



    Community Moderator

    Re: BMI085 FIFO tag application

    Hi dcindric28,

    "FIFO synchronization with external interrupts" was used to synchronize the data of accel and gyro. The example code is

    "FIFO synchronization with external interrupts(tag application) for the gyroscope" was used to synchronize the data of other sensors(sensor other than accel) and gyro, currently there was no example for it.
    What is your application? If you only want to synchronize accel and gyro data, this example read_synchronized_data_mcu is enough for you.