Bosch Sensortec Community

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

    BMI270 vs BMI160

    BMI270 vs BMI160

    jmuellers
    Member

    Hello,

    we are currently using a system based on the Dialog IoT sensor with BMI160+BMM150.
    I see now that BMI270 is a possible successor of BMI160. I have three questions:

    1) The sensor is pin compatible. Are all SPI commands (registers) that were used in BMI160 the same in BMI270, or do I have to expect lots of changes in the code?

    2) For the BMI160, the current consumption with "significant motion detector" is stated in the datasheet as max 20µA. I am missing this info for BMI270, we want to use it to wake up our MCU via interrupt.

    3) Is the BMI270 the best choice for our application? We are not using any "smart" features, we just need low power and up to ~100Hz. What about the BMI26x series? When will it be available?

    Thanks,

    Johannes

    6 REPLIES 6

    Got it.

    Indeed there are a lot of changes to the code, but there should be minimal changes to *your* code if you use our sensor free sensor APIs:
    https://github.com/BoschSensortec/BMI160_driver
    https://github.com/BoschSensortec/BMI270-Sensor-API

    Although completely different internally, really in your application code all you have to do is provide a read/write function pointer and call the init function. Of course the function names are different but the concept is the same.

    The same read/write function that works with BMI160 will work for BMI270. The main difference really is that the sensor API for BMI270 uses a lot more ROM space than BMI160 code. That would only impact your application if you didn't have 8kB available ROM to store the BMI270 firmware.

    Hi all

    I used to use bmi160 for my application and I am upgrading to bmi270. 

    I am struggling to make work the functionalities I used to have with bmi160. I am using interrupts examples from GitHub https://github.com/BoschSensortec/BMI270-Sensor-API/tree/master/bmi270_legacy_examples but I got only one working - TAP interrupt. 

    I am using bmi270 in 'legacy' mode. See below my initilisation function. I have 2 sensors: I use interrupts to wake up the MCU + accelemorter and gyro data to process.

      ss_dev_addr[SS_SENS1] = BMI270_ADDR1;
      ss_dev_addr[SS_SENS2] = BMI270_ADDR2;
      for (uint8_t i = SS_SENS1; i < SS_SENS_MAX; i++)
      {
        /* Init sensor  */
        ss_sens[i].intf = BMI2_I2C_INTF;
        ss_sens[i].read = bmi_read;
        ss_sens[i].write = bmi_write;
        ss_sens[i].delay_us = bmi_delay_us;
        ss_sens[i].intf_ptr = &ss_dev_addr[i];
        ss_sens[i].read_write_len = 64;
        ss_sens[i].config_file_ptr = NULL;
        EM_ASSERT(rslt = bmi270_legacy_init(&ss_sens[i]),
                  EM_ERROR_SS,
                  EM_ACTION_RESET_SYSTEM);
        bmi2_error_codes_print_result(rslt);
        EM_ASSERT(ss_sens[i].chip_id == BMI270_CHIP_ID,
                  EM_ERROR_SS,
                  EM_ACTION_RESET_SYSTEM);
        // Interrupt PINs configuration
        struct bmi2_int_pin_config data_int_cfg;
        data_int_cfg.pin_type = BMI2_INT1;
        data_int_cfg.int_latch = BMI2_INT_NON_LATCH;
        data_int_cfg.pin_cfg[0].output_en = BMI2_INT_OUTPUT_ENABLE; // Output enabled
        data_int_cfg.pin_cfg[0].od = BMI2_INT_PUSH_PULL;            // OpenDrain disabled
        data_int_cfg.pin_cfg[0].lvl = BMI2_INT_ACTIVE_HIGH;          // Signal Low Active
        data_int_cfg.pin_cfg[0].input_en = BMI2_INT_INPUT_DISABLE;  // Input Disabled
        rslt = bmi2_set_int_pin_config(&data_int_cfg, &ss_sens[i]);
        bmi2_error_codes_print_result(rslt);
    }

     

    My understaing is using bmi270_legacy_init() instead of bmi270_init() would make bmi270 function as bmi160. Is that correct?

    Any advice would be much appreciated. 

    Many 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