08-06-2021 03:21 PM
Hi Everyone,
Present i am working with BMX160 Sensor, Till now i am able to read Device ID and Accel, Gyro and Mag raw data.
Now my aim is to implement "NO-MOTION" interrupt,as part of it i configured sensor like below by taking ref from below link
void No_Motion_config(void)
{
struct bmi160_int_settg int_config;
// Configure interrupt
int_config.int_channel = BMI160_INT_CHANNEL_2; /* Select the Interrupt channel/pin */
int_config.int_type = BMI160_ACC_SLOW_NO_MOTION_INT; /* Select the Interrupt type */
/* Select the interrupt channel/pin settings */
int_config.int_pin_settg.output_en = BMI160_ENABLE;
int_config.int_pin_settg.output_mode = BMI160_DISABLE;
int_config.int_pin_settg.output_type = BMI160_DISABLE;
int_config.int_pin_settg.edge_ctrl = BMI160_ENABLE;
int_config.int_pin_settg.input_en = BMI160_DISABLE;
int_config.int_pin_settg.latch_dur = BMI160_LATCH_DUR_NONE;
/* Select the Any-motion interrupt parameters */
int_config.int_type_cfg.acc_no_motion_int.no_motion_sel = BMI160_ENABLE;
int_config.int_type_cfg.acc_no_motion_int.no_motion_x = BMI160_ENABLE;
int_config.int_type_cfg.acc_no_motion_int.no_motion_y = BMI160_ENABLE;
int_config.int_type_cfg.acc_no_motion_int.no_motion_z = BMI160_ENABLE;
int_config.int_type_cfg.acc_no_motion_int.no_motion_src=1;
int_config.int_type_cfg.acc_no_motion_int.no_motion_dur = 40;
int_config.int_type_cfg.acc_no_motion_int.no_motion_thres = 20;
/* Set the Any-motion interrupt */
rslt = bmi160_set_int_config(&int_config, &bmi); /* sensor is an instance of the structure bmi160_dev */
}
1) After completion of IMU Configuration, i kept IMU flat surface(Table ) for morethan 10 Mints but i did not get "no motion" Interrupt.
2) But when i read INT_STATUS[1](0x1D) Reg by moving IMU,then i am getting "no motion" innterrupt bit is High.
3) If i kept IMU at Rest position on Table then INT_STATUS[1](0x1D) Reg "no motion" innterrupt bit become Low.
4) Am doing wrong Testing procedure for this? or Any thing missing in IMU Configuration?
5) I am confusing to undersatnd this concept of "no-motion", Can you please provide me any Testing Procedures PDF or Weblinks for this to overcome it.
Thank you in advance
Amarr
Solved! Go to Solution.
08-09-2021 05:28 AM
Hi,
Please give me reply.
Thank you.
amarr
08-09-2021 10:21 AM
Hello amar,
The duration time is too big if you set it as value 40. You could set it to default value and test it again.
int_config.int_type_cfg.acc_no_motion_int.no_motion_dur = 40;