Bosch Sensortec Community

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

    BMA280 no-motion & LPM1

    BMA280 no-motion & LPM1

    ibefra
    New Poster

    I want to minimize current consumption by switching from NORMAL to Low Power Mode 1 and to detect no-motion simultaneously.

    That works. But when I'm trying to move BMA280 continually, no-motion interrupt is fired despite the fact that motion does persist. Tested with sleep_dur 0.5ms, 500ms, 1s. In NORMAL mode I see no interrupts by moving the device, and I do see no-motion interrupt when BMA280 is motionless.

     

    Is that expected behaviour? Can I use no-motion & LPM1 together or not?

    15 REPLIES 15

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    There is a problem in 0x07 -> INT_RST_LATCH // latched interrupt. When there is no motion for 15s, INT2 pin will go high. Because you latched the interrupt, it will never go low again when you tap the BMA280 continuously. So please try 0x00 -> INT_RST_LATCH // latched interrupt. I have verified your settings on my evakl. board. The INT2 pin no motion interrupt works fine in both normal mode and LPM1 mode with 1s sleep duration.

    Thanks.

    Still no luck. Even with 0x00 -> INT_RST_LATCH. Tested on two boards (one with I2C, another with SPI). There is continuous motion, but no-motion interrupt  IS FIRED after 15s in LPM1 (this issue IS NOT SEEN IN NORMAL MODE). And motion shouldn't cause no-motion interrupt (or not?)

    Can I, please,  obtain Your functional LPM1+no motion setup (content of ALL 64 BMA280 registers)?

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Please see the attached screenshot of the BMA280 register dump and INT2 pin signal in LPM1 mode. I gently tap the board INT2 pin signal goes low. 15s later INT2 pin signal goes high because of no motion.

    BMA280_register_dump_nomotion_LPM1BMA280_register_dump_nomotion_LPM1

     

    BMA280_INT2_nomotion_LPM1BMA280_INT2_nomotion_LPM1

    Thanks.

    I.
    There is 0x0E in PMU_BW (500Hz), but default value after softreset is 2000Hz (my setup + INT_RST_LATCH set to 0x00). But transition from 2000 to 500Hz doesn't change anything on my side.

     

    II.
    "I gently tap the board INT2 pin signal goes low."

    But I do not see any changes in g in plot (red = 1.000/probably z, green = 0.000/probably x and y)

    Please:
    do strongly tap continuously and observe INT2 (plot with changes in g will be helpful), if it goes high or not (my goes high by tapping and this is undesired - system falls to sleep inadvertently)

    Again and again: problems are only in LPM1, NORMAL mode is OK (i.e. no no-motion interrupt when tapping).

     

    III.
    I see the same issue with BMA250E and LPM1

     

    IV.
    Can You, please, provide source code with exact steps in right order, how to fully set BMA280 to LPM1 with no-motion interrupt enabled?
    Thanks.

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Please see the attached screenshot again. I changed the no motion duration to 2s in order to capture the screenshot. I continuously tap the board and there are pulses on INT2 pin. This is because BMA280 takes measurement at every 1s in LPM1 due to the 1s sleep time. If the motion happens exactly at the time point of 2s no motion duration expires, then INT2 pin will keep low meaning that the motion is still there. Otherwise, INT2 goes high. Because I continuously tap the board, INT2 goes low quickly due to the motion detected.

    BMA280_no_motion_INT2_LPM1_1s_sleep_and 2s_durationBMA280_no_motion_INT2_LPM1_1s_sleep_and 2s_duration

    BMA280 default ODR is 2000Hz for unfiltered data. You need to write value of 0x0E to register 0x10 to change the ODR to 1000Hz which is 500Hz BW. When you write value of 0x5E to register 0x11, BMA280 enters LPM1 mode with 1s sleep time. If you want to have similar no motion interrupt performance like normal mode, then you can write value of 0x56 to register 0x11 to have 25ms sleep time in LPM1.

    Below is the pseudo code:

                Write value of 0xB6 to register 0x14;               // soft-reset

               Delay 5ms;  // wait for BMA280 to stabilize

                Write value of 0x04 to register 0x20;               // set INT2 pin to push-pull and active-high

                Write value of 0x0A to register 0x29;               // set no motion threshold to 39mg at +/-2g full scale range

                Write value of 0x04 to register 0x27;               // set no motion duration to 2s

                Write value of 0x00 to register 0x21;               // set INT2 as non-latched

                Write value of 0x08 to register 0x1B;               // map no motion interrupt to INT2 pin

                Write value of 0x0F to register 0x18;               // select no motion and enable x/y/z axes for no motion

                Write value of 0x5E to register 0x11;               // set BMA280 to LPM1 mode with 1s sleep time (need to change to 25ms sleep time)

    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