This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Accessing Magnetometer configuration register in MPU9150



Hello everyone,

I am trying to access the configuration registers of magneto meter in MPU9150. I am not getting on which slave device it is mapped. and waht can be the address for accessing its configuration registers.

can anyone help me on this.

Thanks

Akshay

  • Hello Akshay,

    For TM4C123: The Slave Address is there in the file as 0x68 and it is on the I2C3 master instance.

    this is there in the example code for the MPU9150 in sensorhub example.

    Regards

    Amit

  • The magneto in the MPU9150 is like a device within a device.  My understanding is that it is basically a MPU6050 with a magneto built in but accessed via an internal I2C bus.

    If I recall there are two ways to access it.  You can setup the MPU9150 as a pass through and directly access the magneto via the master MCU i2c.  You can alternately setup the MPU9150 to manage the magneto on its own I2C internal I2C master. 

    For pass through I don't recall the registers in the MPU9150 that configure it as pass through mode. 

    For the MPU9150 managed mode there are 4 or 5 sets of registers at the end of the address space for the MPU9150 that setup the I2C slave commands and what triggers those commands.  I believe the example and/or library code sets up the last of these to trigger the next sample.  The first 3 or 4 are used to read the previous result.   Look at this code and you can rework it to send different configuration parameters to the magneto.