Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BMA253 - How to get access to results of the interrupt engines

    BMA253 - How to get access to results of the interrupt engines


    First of all, I believe this topic is not exclusive to the BMA253 sensor, but is more general to all Bosch accelerometers.

    I run the BMA253 in lowpower mode 2, and the sleepttimer in equidistant-sampling mode. I have activated the high-g interrupt and catch this event. In my ISR I would like to read the FIFO to store the value(s) that led to the interrupt (with a timestamp). Unfortunately I don't get a value that is above the threshold when I read the FIFO after an interrupt.

    The question a bit more concrete: Are the values generated by the interrupt engine stored in the FIFO at all?

    I would be glad about helpful answers

    6 REPLIES 6

    Community Moderator
    Community Moderator


    Thanks for your inquiry.

    BMA253 FIFO works at low power mode 2 and you can read FIFO data at any time. High-g interrupt usually happens very fast while FIFO data samples may miss the data that is beyond the threshold. You can keep tapping BMA253 to generate high-g interrupt. After you enter ISR you can delay a few data samples time while you are still tapping and then read FIFO. You should be able to see the data samples that are beyond the high-g threshold from the FIFO.


    Thank you very much for your reply.

    So I understood correctly that the results of the interrupt engine are not stored in the FIFO. And I have to be more or less lucky that the interrupt is triggered exactly when a value is stored in the FIFO anyway?

    Or does this have something to do with the filtered or unfiltered data as input for the interrupt engine?

    Because if I use filtered data for the interrupt engine as well as for the normal measurement, which moves into the FIFO, then these are recorded in the same frequency. Which would mean that I would only have to read out the FIFO fast enough, right?

    Community Moderator
    Community Moderator


    BMA253 low power mode 2 (LPM2) automatically switches between normal mode and standby mode based on sleeptime. Every time when BMA253 wakes up from standby mode to normal mode, it will take a measurement and place the data sample in FIFO if it is enabled. Then BMA253 goes to standby mode. When the sleeptime expires, it wakes up and takes a measurement again.

    However, if high-g interrupt is enabled, then every time when BMA253 wakes up from standby mode to normal mode, it will take more measurements based on high-g duration to see if high-g interrupt event is valid or not and place the first data sample in FIFO if it is enabled. Then BMA253 goes to standby mode. When the sleeptime expires, it wakes up and takes a few measurements again.

    This means that in LPM2 mode if FIFO is enabled you will not be able to see data samples that are beyond high-g threshold, because high-g interrupt event always happens after FIFO data sample is filled in.

    Please see the attached two screenshots for more informaiton. BMA253 is set to 2000Hz ODR, +/-2g full scale range, LPM2 with equidistant sampling time-based, high-g threshold 1.4g and high-g duration 2ms.

    In order to see FIFO data beyond high-g threshold you have to always use normal mode.


    Thanks again for your answer,

    I think it has become much clearer to me how the interrupt engine works while the decivce is in lowpower mode.

    Maybe one or two more questions will bring me to the solution of my problem.

    I'm less interested in the continuously generated data, and more interested in the information about the event that led to the interrupt

    If I were to run the device in event-driven sleep mode (EDT) instead of EST and a high-G interrupt occurred, would any data regarding that interrupt be stored in the FIFO so that the host microcontroller could access it to get not only the information that an interrupt occurred, but also the value above the threshold?