I have a lot of issues with respect to the BMX160. I'll start with the data sheet. From what I see there is no reference to the BMM150 although it appears to integrated into the package but there is no references as to how. The forums when people have asked about the BMX160 the response is related to the BMI160 and I suspect with the BMM150 attached to it auxiliary I2C port. Looking at the Page 25 and 26 there are steps to communicate with the magnetometer (BMM150) using the Indirect Read and Write protocol except the documentation is misleading. What I eventually discovered was that: MAG_IF[3] is a read/write data register MAG_IF[2] selects the magnetometer Address to Write to MAG_IF[1]selects the magnetometer Address to Read from I have issues with the static reading from the magnetometer. I compared it with the NXPFXOS8700 and FXAS21002 sensor I'm currently using and there is a significant variation. trying to calibrate using the PJRC (of Teensy fame) tool and a version that I adapted from NXP c I have attached 2 files: BMX160 Indirect Read-Write Code V01 -the Arduino cpp code snip that is used to read and write to the BMX160 over I2C. In my code I test the BMX160 status register to make sure the transaction is complete but it doesn't always work. Sometimes the data returned from the current read is the data from the last read. See the BMX160 Advanced Test Configuration the sequence. BMX160 Advanced Test Configuration V01 - the prinout of the steps to perform an Advanced Self Test and the results look odd. I have assumed that each bit in the count is 0.3uT although it is difficult to work out what is going on in the BMM150 code as it includes compensation using Trim data. From my observations reading the documents the TFM should trigger a sample (sequence) and the return to sleep.
... View more