Thanks for your help. Could you let me get the best configuration values for double tap? Here are settings that I evaluated but it is hard to see double tap interrupt. Sometimes, the double tap interrupt occurs but not every time. int_config.int_channel = BMI160_INT_CHANNEL_2;// Interrupt channel/pin 1 int_config.int_type = BMI160_ACC_DOUBLE_TAP_INT;// Choosing Any motion interrupt /* Select the interrupt channel/pin settings */ int_config.int_pin_settg.output_en = BMI160_ENABLE;// Enabling interrupt pins to act as output pin int_config.int_pin_settg.output_mode = BMI160_DISABLE;// Choosing Open drain for interrupt pin int_config.int_pin_settg.output_type = BMI160_DISABLE;// Choosing active low output int_config.int_pin_settg.edge_ctrl = BMI160_ENABLE;// Choosing edge triggered output int_config.int_pin_settg.input_en = BMI160_DISABLE;// Disabling interrupt pin to act as input // int_config.int_pin_settg.latch_dur = BMI160_LATCH_DUR_80_MILLI_SEC;// non-latched output // int_config.int_pin_settg.latch_dur = BMI160_LATCH_DUR_160_MILLI_SEC; int_config.int_pin_settg.latch_dur = BMI160_LATCH_DUR_10_MILLI_SEC; // Configure accel and gyro sensors in normal mode sensor.accel_cfg.odr = BMI160_ACCEL_ODR_200HZ; sensor.accel_cfg.range = BMI160_ACCEL_RANGE_2G; sensor.accel_cfg.bw = BMI160_ACCEL_BW_NORMAL_AVG4; sensor.accel_cfg.power = BMI160_ACCEL_NORMAL_MODE; sensor.gyro_cfg.odr = BMI160_GYRO_ODR_50HZ; sensor.gyro_cfg.range = BMI160_GYRO_RANGE_125_DPS; sensor.gyro_cfg.bw = BMI160_GYRO_BW_NORMAL_MODE; sensor.gyro_cfg.power = BMI160_GYRO_SUSPEND_MODE; /* Set the Power mode */ rslt = bmi160_set_power_mode(&sensor); /* Select the Any-motion interrupt parameters */ int_config.int_type_cfg.acc_tap_int.tap_thr = 4; // 62.5mg * val for 2g // 125mg * val for 4g int_config.int_type_cfg.acc_tap_int.tap_shock = BMI160_DISABLE; // 0 : 50ms / 1 : 75ms int_config.int_type_cfg.acc_tap_int.tap_quiet = BMI160_DISABLE; // 0 : 30ms / 1 : 20ms int_config.int_type_cfg.acc_tap_int.tap_data_src=BMI160_DISABLE; // filtered or pre-filtered int_config.int_type_cfg.acc_tap_int.tap_dur = 3; //0:50ms, 1:100ms, 2:150ms, 3:200ms, 4:250ms.... int_config.int_type_cfg.acc_tap_int.tap_en = BMI160_ENABLE;
... View more