As far as I've understood the trim values need to be read from the BMX160 via the mag_if registers. Following the datasheet: For a read access:
Write magnetometer register address to read from into Register (0x4D) MAG_IF[1]
Read
Register (0x1B) STATUS
until the bit mag_man_op is “0”
Read Register (0x04-0x0B) DATA_0 to DATA_7, get the data from magnetometer
1. First setting the Powermode: 0x19 -> BMX160_COMMAND_REG_ADDR 2. Set setup mode with burst read 8 bytes: 0x83 -> BMX160_MAG_IF_0_ADDR 3. Write Regaddres too MAG_IF1: BMM150_DIG_Z4_LSB -> BMX160_MAG_IF_1_ADDR wait 10 ms 4. Read Status byte and check bit man_mag_op is "0" 5. Read Register (0x04-0x0B) DATA_0 to DATA_7, get the data from magnetometer But I am always getting zeros and not data. Help is apreciated. Best regrads, Constantin
... View more