Bosch Sensortec Community

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

    BMX160 No-motion

    BMX160 No-motion

    amar
    Established Member

    Hi Everyone,

    Present i am working with BMX160 Sensor, Till now i am able to read Device ID and Accel, Gyro and Mag raw data.

    Now my aim is to implement "NO-MOTION" interrupt,as part of it i configured sensor like below by taking ref from below link

    https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BMI160-No-Motion-Interrupt-Duration/m-p/... 

    void No_Motion_config(void)
    {
    	  struct bmi160_int_settg int_config;
    
    		// Configure interrupt
        int_config.int_channel = BMI160_INT_CHANNEL_2; /* Select the Interrupt channel/pin */
        int_config.int_type = BMI160_ACC_SLOW_NO_MOTION_INT; /* Select the Interrupt type */
    		
    		/* Select the interrupt channel/pin settings */
        int_config.int_pin_settg.output_en = BMI160_ENABLE;
        int_config.int_pin_settg.output_mode = BMI160_DISABLE;
        int_config.int_pin_settg.output_type = BMI160_DISABLE;
        int_config.int_pin_settg.edge_ctrl = BMI160_ENABLE;
        int_config.int_pin_settg.input_en = BMI160_DISABLE;
        int_config.int_pin_settg.latch_dur = BMI160_LATCH_DUR_NONE;
    	
        /* Select the Any-motion interrupt parameters */
        int_config.int_type_cfg.acc_no_motion_int.no_motion_sel = BMI160_ENABLE;
        int_config.int_type_cfg.acc_no_motion_int.no_motion_x = BMI160_ENABLE;
        int_config.int_type_cfg.acc_no_motion_int.no_motion_y = BMI160_ENABLE;
        int_config.int_type_cfg.acc_no_motion_int.no_motion_z  = BMI160_ENABLE;
    	  int_config.int_type_cfg.acc_no_motion_int.no_motion_src=1; 
        int_config.int_type_cfg.acc_no_motion_int.no_motion_dur = 40;  
        int_config.int_type_cfg.acc_no_motion_int.no_motion_thres = 20;  
    		
    
    		/* Set the Any-motion interrupt */
    		rslt = bmi160_set_int_config(&int_config, &bmi); /* sensor is an instance of the structure bmi160_dev  */	
    }

     

    1) After completion of IMU Configuration, i kept IMU  flat surface(Table ) for morethan 10 Mints but i did not get "no motion" Interrupt.

    2)  But when i read INT_STATUS[1](0x1D) Reg by moving IMU,then i am getting "no motion" innterrupt  bit is High.

    3) If i kept IMU at Rest position on Table then  INT_STATUS[1](0x1D) Reg  "no motion" innterrupt  bit become  Low.

    4) Am doing wrong Testing procedure for this? or Any thing missing in IMU Configuration?

    5) I am confusing to undersatnd this concept of "no-motion", Can you please provide me any Testing Procedures PDF or Weblinks for this to overcome it.

    Thank you in advance

    Amarr

      

    2 REPLIES 2

    amar
    Established Member

    Hi,

    Please give me reply.

    Thank you.

    amarr

    BSTRobin
    Community Moderator
    Community Moderator

    Hello amar,

    The duration time is too big if you set it as value 40. You could set it to default value and test it again.
    int_config.int_type_cfg.acc_no_motion_int.no_motion_dur = 40;

    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