I am trying to perform the self-test for the bmx160's magnetometer but I haven't been able to find any information on how to use the indirect read to get the test results. Here are the steps I am taking to do the test:
1. Set mag_manual_en bit
2. Put mag in sleep mode
3. Indirectly set self-test bit (Write 0x01 to MAG_IF, then write 0x4C to MAG_IF)
4. Set indirect read address to 0x42 for Self-Test-X result ( Write 0x42 to MAG_IF)
After this I dont know how to actually access the data that is being indirectly read from MAG_IF.
Does it go to the DATA register?
You can refer to a previous post about using the BMX160 here. In addition, you may use the BMM150 self-test functions to perform the self-test prior to data streaming.
Using the auxilliary interface directly would be more complex without a driver.