11-23-2020 08:52 PM
Hi,
I'm using a BMI160 and I read the acceleration value using the ''Data Ready Detection'' interrput. I set the ODR to 1600 Hz. I checked with a scope and the interupt fires at 1600Hz. For a reason that I ignore, I see the value changing only at every 16 samples as if the ODR is 100 Hz instead of 1600 Hz as I setted. Is this bebehaviour normal or there is something wrong (maybe the bandwitch configuration : BMI160_ACCEL_BW_NORMAL_AVG4)? The gyro is setted too to an ODR of 1600 Hz and the incomming data value is changing at each new sample as expected. There is graph of accelero and gyro data set showing that the acceleration values reaches plateau of 16 samples:
Acceleration vs time:
Angular acceleration vs time:
The is the ininitialization code :
* Select the Output data rate, range of accelerometer sensor */
dev->accel_cfg.odr = BMI160_ACCEL_ODR_1600HZ;
dev->accel_cfg.range = BMI160_ACCEL_RANGE_2G;
dev->accel_cfg.bw = BMI160_ACCEL_BW_NORMAL_AVG4;
/* Select the power mode of accelerometer sensor */
dev->accel_cfg.power = BMI160_ACCEL_NORMAL_MODE;
/* Select the Output data rate, range of Gyroscope sensor */
dev->gyro_cfg.odr = BMI160_GYRO_ODR_1600HZ;
dev->gyro_cfg.range = BMI160_GYRO_RANGE_2000_DPS;
dev->gyro_cfg.bw = BMI160_GYRO_BW_NORMAL_MODE;
/* Select the power mode of Gyroscope sensor */
dev->gyro_cfg.power = BMI160_GYRO_NORMAL_MODE;
/* Set the sensor configuration */
rslt = bmi160_set_sens_conf(dev);
/* Initialize the auxiliary sensor interface */
rslt = bmi160_aux_init(dev);
Solved! Go to Solution.
11-24-2020 01:46 AM
Hello Emile,
The configuration you post looks fine.
I saw you enabled aux interface as well.
Could you disable it and check it? ( just want to see BMI160 internal sensor data )
And still there is some issue, could you upload whole part of configuration?
Thanks 🙂
11-24-2020 03:24 PM
The issue was that the bmi was resseting for some reason in the code causing that the ODRof the accelerowas ressetted to 100 Hz instead of 1600 Hz.