I'm using a BMM150 as auxiliary sensor of a BMI270.
The communication works correctly, but I get weird data for the Z axis.
Debugging the sensor API I noticed that the `compensate_z` function always returns `BMM150_OVERFLOW_OUTPUT` because `dev->trim_data.dig_z2` is always ZERO.
How is this possible?
I just noticed, debugging the Bosh API, that the function `compensate_z` always returns `BMM150_OVERFLOW_OUTPUT` because `trim_data.dig_z2` is zero...
How can this be possible? Does this mean that the initial trimming has failed?
Furthermore performing a self test after initialization I get the following errors:
Normal test: `BMM150_W_NORMAL_SELF_TEST_XZ_FAIL`
Advanced test: `BMM150_W_ADV_SELF_TEST_FAIL`
We have been using the BMM150 in production for a few years now. We had to make a special effort to overcome initial poor yields. Even minor superficial damage to the package may cause it to fail. A device will typically fail completely but we have observed other failure modes such as single axis failure, failure after a period of time (minutes), or otherwise unreliable measurements.
Physical damage can result in a whole range of unexpected behaviour. It seems reasonable to expect this to include apparent corrupted register values.