Bosch Sensortec Community

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

    BMA280 Fifo in Low power mode.

    taerimpark
    New Poster

    BMA280 Fifo in Low power mode.

    Hi, 

    I'm designing a battery powered device wit BMA280. So, I hope to use Low power modes with FIFO.

    The operation sequence I'm testing is like this. 

    1. Constantly monitoring vibration in LPM1. In this time,  slope interrupt is mapped interrupt pin1.

    2. If some movement is detected, disables interrupt 1 and starts using FIFO with a equidistance mode. 

        In this time, changes mode to  LPM2 to get data from FIFO_DATA (0x3F) and  enables watermark interrupt mapped to interrupt pin2.

       Actually, I set to Normal mode before going LPM2 from LPM1.

    3. Fetching data from Fifo for a while.

    4. After then, goes back to LPM1 again, enables interrupt 1, and disable interrupt 2. 

     

    But, unfortunately, I found that Fifo is not filled when I change mode from LPM1 to Normal in step 2 above.

    The only way I can make queue operation again is applying softreset.

    If I block codes to change modes, it correctly fills FIFO and invokes watermark interrupt (pin2)

    Am I using BMA280 correctly? Is there any command to run FiFo filling operation while I'm changing modes?

    Thanks,  

    6 REPLIES 6
    FAE_CA1
    Community Moderator

    Re: BMA280 Fifo in Low power mode.

    Hi,

    Thanks for your inquiry.

    If you want to record BMA280 x/y/z data into FIFO in STEAM mode with EST mode in LPM1, then you could try the following in your step 2:

    (1)Disable INT1 for slope interrupt

    (2) Switch to Standby mode

    (3) Write value of 0x8C to register 0x3E to clear FIFO buffer

    (4) Set FIFO watermark level and enable FIFO watermark interrupt and map it to INT2 pin

    (5) Switch to LPM1 mode and then FIFO will start filling data

    (6) Wait for INT2 pin interrupt for FIFO watermark interrupt

    (7) After INT2 interrupt is generated, disable INT2 and switch to normal mode and fetch FIFO data

    (8) Switch to LPM1 and enable INT1 for slope interrupt

    (9) After INT1 is generated again, go back to (1)

    Please let us know how it goes.

    Thanks.

    taerimpark
    New Poster

    Re: BMA280 Fifo in Low power mode.

    Thank you,

    The reason I didn't try the way was I coun't sure of the timing.

    I attached a figure. Please look at for a while.

    I hope to get samples in equistance timing.

    Is the internal timer in BMA280 keeps the timing

    while we change to normal mode, fetch data, and re-entering LPM1 mode?

    For example, in my figure the time distance btw 4th and 5th samples.

    If it keeps timing regardless of changing modes, I'll be very happy.

    I'll use this way. 

    If it is not, the I guess I have to use LPM2 mode for reading Q data. 

    Currently I don't know how to change a mode from LPM1 --> normal --> LPM2, without softreset.

    taerimpark
    New Poster

    Re: BMA280 Fifo in Low power mode.

    Can you see the attached figure?

    I attached the fiure. But, I think it is not displayed.

    Here I did it again.

    If intr_timing.JPG

    FAE_CA1
    Community Moderator

    Re: BMA280 Fifo in Low power mode.

    Hi,

    BMA280 will not be able to keep the timing when you switch to normal mode (NM) from LPM1 and then go back to LPM1 for the FIFO. If you get the slope interrupt in LPM1 mode, then you can switch to LPM2 mode and use EST mode so that FIFO data will keep the timing like the way you expected.

    After power on or soft-reset BMA280 will be in NM mode at 500Hz BW or 1000Hz ODR by default. It consumes about 130uA. You can then write value of 0x0F to register 0x10 to set the ODR to 2000Hz. Suppose you use 25ms sleep time for LPM1 and LMP2. After you write value of 0x56 to register 0x11, BMA280 will enter LPM1 and consumes about 6.5uA.

    Below is the pseudo code to enter LPM2 from LPM1.

    (1) Write value of 0x16 to register 0x11; // this will clear the lowpower_en bit and BMA280 will enter NM with about 130uA current consumption

    (2) Write value of 0x60 to register 0x12; // this will set the lowpower_mode bit to be prepared to enter LPM2. EST mode is enabled

    (3) Write value of 0x56 to register 0x11; // this will make BMA280 enter LPM2 with about 60uA current consumption

     

    Below is the pseudo code to enter LPM1 from LPM2.

    (1) Write value of 0x16 to register 0x11; // this will clear the lowpower_en bit and BMA280 will enter NM with about 130uA current consumption

    (2) Write value of 0x40 to register 0x12; // this will clear the lowpower_mode bit to be prepared to enter LPM1. EST mode is enabled

    (3) Write value of 0x56 to register 0x11; // this will make BMA280 enter LPM1 with about 6.5uA current consumption

    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