title: MPU-6050 Burst Read Auto Increment
body: <p>I'm trying to write a driver for the MPU-6050 and I'm stuck on how to proceed regarding reading the raw accelerometer/gyroscope/temperature readings. For instance, the MPU-6050 has the accelerometer X readings in 2 registers: ACCEL_XOUT[15:8] at address 0x3B and ACCEL_XOUT[7:0] at address 0x3C. Of course to read the raw value I need to read both registers and put them together.</p>
  <p><strong>BUT</strong></p>
  <p>In the description of the registers (in the register map and description sheet, <a href="https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf" rel="nofollow noreferrer">https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf</a>) it says that to guarantee readings from the same sampling instant I must use burst reads b/c as soon as an idle I2C bus is detected, the sensor registers are refreshed with new data from a new sampling instant. The datasheet snippet shows the simple I2C burst read:</p>
  <p><a href="https://i.stack.imgur.com/v5Ky6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v5Ky6.png" alt="enter image description here" /></a></p>
  <p>However, this approach (to the best of my understanding) would only work reading the ACCEL_X registers from the same sampling instant if the auto-increment was supported (such that the first DATA in the above sequence would be from ACCEL_XOUT[15:8] @ address 0x3B and the second DATA would be from ACCEL_XOUT[7:0] @ address 0x3C). But the datasheet (<a href="https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf" rel="nofollow noreferrer">https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf</a>) only mentions that I2C burst writes support the auto-increment feature. Without auto-increment on the I2C read side how would I go about reading two different registers whilst maintaining the same sampling instant?</p>
  <p>I also recognize that I could use the sensor's FIFO feature or the interrupt to accomplish what I'm after, but (for my own curiosity) I would like a solution that didn't rely on either.</p>