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
... View more