Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BMA456 any-motion/no-motion interrupts vs. ODR

    rearmimator
    Member

    BMA456 any-motion/no-motion interrupts vs. ODR

    Hi there,

     

    I wonder if there is any dependency between any-motion/no-motion interrupt generation and configured output data rate (ODR).

    Oddly enough, but no interrupts are generated when I configure ODR down below 12.5 Hz.

    Thus setting ODR in range from 6.25 Hz to 0.78 Hz cause no interrupt, no matter how long I wait or strong shake the board.

    Here is sample configuration at 3.12 Hz, which causes no interrupt with bma456_v2.12.8 release;

    === Get accelerator configuration successful ===
    odr = 8
    range = 1
    bandwidth = 2
    perf_mode = 1
    
    === Set accelerator configuration successful ===
    odr = 3
    range = 1
    bandwidth = 2
    perf_mode = 1
    
    === Get any-motion configuration successful === 
    axis_en = 0x0
    duration = 0x5
    threshold = 0xaa
    
    === Get no-motion configuration successful === 
    axis_en = 0x0
    duration = 0x5
    threshold = 0xaa
    
    === Set any-motion configuration successful === 
    axis_en = 0x7
    duration = 0x5
    threshold = 0x400
    
    === Set no-motion configuration successful === 
    axis_en = 0x7
    duration = 0x1f4
    threshold = 0xcc

     

    Tags (1)
    7 REPLIES 7
    Minhwan
    Community Moderator

    Re: BMA456 any-motion/no-motion interrupts vs. ODR

    Hello, 

     

    One thing I'd like to mention that the ODR range for performance is from 12.5 to 1600, and the ODR range for low power mode is from 0.78 to 400. 

    No motion and any motion should work in low power mode as well, but you should consider how it works. 

    Regarding any motion, the idea is if the data is over the threshold and it keeps over duration, any motion interrupt is generated. 

    No motion is vice versa. 

    If ODR is slow, it takes longer time for duration therefore you have to modify duration value. 

    If you are using github API, you can check in bma456h_feature_enable.

    BMI270 datasheet has detailed information about anymotion and nomotion. 

    https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi270-ds000.pdf

    Please let me know if you have any quesitons. 

    Thanks, 

    rearmimator
    Member

    Re: BMA456 any-motion/no-motion interrupts vs. ODR

    Hi,

    Thanks for prompt reply!

    Please allow me to share my findings first.

    I digged more caerfully into documentation.

    There is indeed ODR restriction implied by performance mode settings.

    According to documentation (BST-MAS-AN032-00, Revision_1.0_082019), page 5

    Accelerometer operation mode
    1. Performance mode (ACC_CONF.acc_perf_mode is 0b1): ODR and Bandwidth values are ignored.
    2. Duty-cycling mode (ACC_CONF.acc_perf_mode is 0b0):
      1. The user ODR shall be >= 50Hz when single-/double-tap is disabled
      2. The user ODR shall be >= 200Hz when single-/double-tap is enabled

    It describes single-/double-tap requirements, but I've found no clue of no-motion/any-motion requirements.

    Moreover, there are some ODR related status flags in  INTERNAL_STATUS (0x2A).

    Playing around with various settings I observe the error bits set or cleared.

     

    However my outcome is, that generation of no-motion/any-motion interrupts depends on ODR settings only.

    Whatever mode (performance or duty-cycle), bandwidth I tried, the only ODR makes the difference.

    Status flags of INTERNAL_STATUS register are irrelevent too.

     


    @Minhwan wrote:

    Hello, 

     

    One thing I'd like to mention that the ODR range for performance is from 12.5 to 1600, and the ODR range for low power mode is from 0.78 to 400. 

    No motion and any motion should work in low power mode as well, but you should consider how it works. 

    Regarding any motion, the idea is if the data is over the threshold and it keeps over duration, any motion interrupt is generated. 

    No motion is vice versa. 

    If ODR is slow, it takes longer time for duration therefore you have to modify duration value. 

    If you are using github API, you can check in bma456h_feature_enable.

    BMI270 datasheet has detailed information about anymotion and nomotion. 

    https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi270-ds000.pdf

    Please let me know if you have any quesitons. 

    Thanks, 


    If ODR is slow, it takes longer time for duration therefore you have to modify duration value. 
    I am not so sure about that. Documentation states that duration is expressed in 20 ms (1/50 Hz⁻1) units.

    Besides that, I waited for minutes for an interrupt. It did not occur.

    BST-MAS-AN032-00, Revision_1.0_082019, page 54

    FEATURES_IN, defintion of any-motion duration field

    Defines the number of consecutive data
    points for which the threshold condition
    must be respected, for interrupt
    assertion.
    It is expressed in in 50 Hz samples (20
    ms). Range is 0 to 163sec. Default
    value is 5=100ms.

     

    If you are using github API, you can check in bma456h_feature_enable.

    Yes, I do use the driver v2.12.8.

    There is bma456_feature_enable  API function.

    But in order to enable any-motion/no-motion feature one must use bma456_set_any_mot_config/bma456_set_no_mot_config  rather than using bma456_feature_enable. Since it controls wearible features (e.g. counter, activity and so) only.

    Tags (1)
    Minhwan
    Community Moderator

    Re: BMA456 any-motion/no-motion interrupts vs. ODR

    Hello, 

     

    I don't understand what you talk about fully, but let me clear. 

    any motion and no motion can be generated regardless of ODR. 

    However, any motion and no motion needs more time if ODR is slow due to duration. 

    Could you give me your configuration setting for no motion? 

    Thanks, 

    rearmimator
    Member

    Re: BMA456 any-motion/no-motion interrupts vs. ODR


    @Minhwan wrote:

    Hello, 

     

    I don't understand what you talk about fully, but let me clear. 

    any motion and no motion can be generated regardless of ODR. 

    However, any motion and no motion needs more time if ODR is slow due to duration. 

    Could you give me your configuration setting for no motion? 

    Thanks, 


    Hi,

    Thanks for feedback!

    Let me try to expain the issue in more details.

    >> any motion and no motion can be generated regardless of ODR. 
    >> However, any motion and no motion needs more time if ODR is slow due to duration. 

    Unfortunately my observations condtradite these statements.

    You may find BMA456 settings in attached archive.

    BMA456 supports ODR in range from 0.78 Hz up to 1600 Hz.

    In my test no-motion/any-motion interrupts are configured in performance mode.

    Time delay between end of sensor initialisation and first no-motion interrupt is measured.

     

    First interrupt time delay vs. ODR / duration = 10s

    no-motion threshold: 100 mG

    no-motion duration: 10 s

    ODR, HzTime delay to first no-motion interrupt, s
    80010
    40010
    20010
    2510
    12.510
    6.25No interrupt occurred

     

    First interrupt time delay vs.ODR / duration = 5s

    no-motion threshold: 100 mG

    no-motion duration: 5 s

    ODR, HzTime delay to first no-motion interrupt, s
    8005
    4005
    12.55
    6.25No interrupt occurred

     

    First interrupt time delay vs.ODR / duration = 20s

    no-motion threshold: 100 mG

    no-motion duration: 20 s

    ODR, HzTime delay to first no-motion interrupt, s
    80020
    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