MPU9150 compass I2C flakiness solved

By vavalencia , 12 September 2014

Just wanted to post this in case others find it useful.

In our application we have an MPU9150 connected to our host processor via an I2C bus that runs at 1.8V. We have a 3.3V rail for the Vdd pins on the MPU9150. What was happening to us was that some number of boards (~10% or so) were failing to probe the MPU9150. When we investigated further we found that the probe was failing when it would attempt to talk to the compass at I2C address 0x0C. We have our MPU9150 set to bypass mode.

After a lot of trial and error we found that we needed to set the level shifter flag in register 1. So:

inv_i2c_single_write(st, 0x01, 0x80);


Completely fixed it for us. Apparently the 1.8V I/O was right on the edge of what the compass would accept, and so while most of our boards were just fine there was always a significant amount of failures. After changing that we have a much higher yield.

As a note to Invensense, this register is completely undocumented and it would have saved us a week of debugging if it had just been in the register manual. Why is it not there?
phpbb Topic ID
16608