Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    How can I know BMI270 is properly initialised?

    How can I know BMI270 is properly initialised?

    victorheca01
    Established Member

    Hi, All

       After initialisation, I got the result as:

    The oldest data was removed. Continue...
    *** Accel(Raw and m/s2) Gyro(Raw and dps) data : 35 *******

    ms2_X = 0.00, ms2_Y = -0.15, ms2_Z = 2.30
    DPS_X = 16.54, DPS_Y = 15.56, DPS_Z = 521.67

    ******* Accel(Raw and m/s2) Gyro(Raw and dps) data : 36 *******

    ms2_X = 0.00, ms2_Y = -0.15, ms2_Z = 2.30
    DPS_X = 16.54, DPS_Y = 15.56, DPS_Z = 521.67

    ******* Accel(Raw and m/s2) Gyro(Raw and dps) data : 37 *******

    ms2_X = 0.00, ms2_Y = -0.15, ms2_Z = 2.30
    DPS_X = 16.54, DPS_Y = 15.56, DPS_Z = 521.67

    ******* Accel(Raw and m/s2) Gyro(Raw and dps) data : 1 *******

    ms2_X = -0.00, ms2_Y = -0.00, ms2_Z = -0.00
    DPS_X = -0.06, DPS_Y = -0.06, DPS_Z = -0.06

    ******* Accel(Raw and m/s2) Gyro(Raw and dps) data : 2 *******

    ms2_X = -0.00, ms2_Y = -0.00, ms2_Z = -0.00
    DPS_X = 15.56, DPS_Y = -15.20, DPS_Z = -0.06

    ******* Accel(Raw and m/s2) Gyro(Raw and dps) data : 3 *******

    ms2_X = -0.00, ms2_Y = -0.00, ms2_Z = -0.00
    DPS_X = 15.56, DPS_Y = -15.20, DPS_Z = -0.06

    ******* Accel(Raw and m/s2) Gyro(Raw and dps) data : 4 *******

    I have following questions:

    1. Is this the correct value or random value?

    2. It seems that if my board doesn't move, the result keeps unchanged, and stop output. However, if I move my board, the data outputs, but sometimes no output, is that correct.

    3. I use the module of:

    bmi_accel_gyro(void)

    and  it check the interrupt status as:

    while (indx <= limit)
    {
    /* To get the data ready interrupt status of accel and gyro. */
    rslt = bmi2_get_int_status(&int_status, &bmi2_dev);
    bmi2_error_codes_print_result(rslt);

    /* To check the data ready interrupt status and print the status for 10 samples. */
    if ((int_status & BMI2_ACC_DRDY_INT_MASK) && (int_status & BMI2_GYR_DRDY_INT_MASK))
    {
    /* Get accel and gyro data for x, y and z axis. */
    rslt = bmi2_get_sensor_data(&sensor_data, &bmi2_dev);
    bmi2_error_codes_print_result(rslt);

    ssprintf("\n******* Accel(Raw and m/s2) Gyro(Raw and dps) data : %d *******\n", indx);
    ssprintf("\n******* Accel(Raw and m/s2) Gyro(Raw and dps) data : %d *******\n", indx);

    I am quite confused by the output results. Thanks in advance.

    1 REPLY 1

    BSTRobin
    Community Moderator
    Community Moderator

    Hi victorheca01,

    1. For your test result, ss the sensor moving or stationary?
    2, 3. Use the data ready interrupt, and the data will be output according to the ODR settings. For example, at 100 Hz ODR, output data once every 10ms, refer to the data ready interrupt example https://github.com/boschsensortec/BMI270-Sensor-API/blob/master/bmi270_examples/accel_gyro/accel_gyr...

    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