Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

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

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

    Marvin
    Member

    Hello,
    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

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    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.

    Thanks.

    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?

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    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.

    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?

    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