04-23-2020 05:32 PM
Hi everyone,
I have reused the BMI160 and BMM150 drivers to get some data from the BMX160. Accel and gyro look to work fine (I mean I get meaningful values will I rotate/move the sensor) but I am not sure about the magnetometer. These are some sample measurements (all values are in LSB)
In order to confirm that all sensor works normally, I've called the bmi160_perform_self_test() and bmm150_perform_self_test() functions.
Accel and gyro perform successfully self-test but magnetometer doesn't. It returns error code 2 which means "BMM150_E_DEV_NOT_FOUND". This is awkward since I am able to receive data before calling the self-test function (as you can see from the image above). Also after calling the bmm150_perform_self_test() function the magnetometer "freezes" (it continuously showing the same values) and I have to restart the board by cutting the power off.
Any suggestion? Maybe this is a bug of the bmm150 driver?
04-24-2020 10:51 AM
This is how I set-up magnetometer's interface
bmm150.settings.pwr_mode = BMM150_NORMAL_MODE;
rslt = bmm150_set_op_mode(&bmm150);
bmm150.settings.preset_mode = BMM150_PRESETMODE_LOWPOWER;
rslt = bmm150_set_presetmode(&bmm150);
APP_ERROR_CHECK(rslt);
04-30-2020 09:53 AM
Anyone?
05-04-2020 07:46 PM
Could someone from the moderators assist me?