Bosch Sensortec Community

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

    BMI160 acceleration data only changes at each 16 values

    Emile
    New Poster

    BMI160 acceleration data only changes at each 16 values

    Hi,

    I'm using a BMI160 and I read the acceleration value using the ''Data Ready Detection'' interrput. I set the ODR to 1600 Hz. I checked with a scope and the interupt fires at 1600Hz. For a reason that I ignore, I see the value changing only at every 16 samples as if the ODR is 100 Hz instead of 1600 Hz as I setted. Is this bebehaviour normal or there is something wrong (maybe the bandwitch configuration : BMI160_ACCEL_BW_NORMAL_AVG4)? The gyro is setted too to an ODR of 1600 Hz and the incomming data value is changing at each new sample as expected. There is graph of accelero and gyro data set showing that the acceleration values reaches plateau of 16 samples:  

    Acceleration vs time:

    accelerao.PNG

     

    Angular acceleration vs time:

    gyro.PNG

    The is the ininitialization code : 

    * Select the Output data rate, range of accelerometer sensor */
    dev->accel_cfg.odr = BMI160_ACCEL_ODR_1600HZ;
    dev->accel_cfg.range = BMI160_ACCEL_RANGE_2G;
    dev->accel_cfg.bw = BMI160_ACCEL_BW_NORMAL_AVG4;

    /* Select the power mode of accelerometer sensor */
    dev->accel_cfg.power = BMI160_ACCEL_NORMAL_MODE;

    /* Select the Output data rate, range of Gyroscope sensor */
    dev->gyro_cfg.odr = BMI160_GYRO_ODR_1600HZ; 
    dev->gyro_cfg.range = BMI160_GYRO_RANGE_2000_DPS;
    dev->gyro_cfg.bw = BMI160_GYRO_BW_NORMAL_MODE;

    /* Select the power mode of Gyroscope sensor */
    dev->gyro_cfg.power = BMI160_GYRO_NORMAL_MODE;

    /* Set the sensor configuration */
    rslt = bmi160_set_sens_conf(dev);

    /* Initialize the auxiliary sensor interface */
    rslt = bmi160_aux_init(dev);

     

     

    2 REPLIES 2
    Minhwan
    Community Moderator

    Re: BMI160 acceleration data only changes at each 16 values

    Hello Emile, 

     

    The configuration you post looks fine. 

    I saw you enabled aux interface as well. 

    Could you disable it and check it? ( just want to see BMI160 internal sensor data ) 

    And still there is some issue, could you upload whole part of configuration? 

    Thanks  🙂 

    Emile
    New Poster

    Re: BMI160 acceleration data only changes at each 16 values

    The issue was that the bmi was resseting for some reason in the code causing that the ODRof the accelerowas ressetted to 100 Hz instead of 1600 Hz.

    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