MPU6050 ACCEL_CONFIG and GYRO_CONFIG write fails

By jbolich , 14 March 2012

Hello,

I'm trying to configure the ranges of my device. At present the values don't make sense; I read ~9700 on the accelerometer Z axis when the device is stationary. If I try to change the ACCEL_CONFIG this value does not change. When I read ACCEL_CONFIG it remains at 0x00 no matter what I try to write to it.

My board is custom, and I'm interfacing the device with an STM32F415. The values I get out of the MPU6050 generally seem OK; I can use them with an AHRS algorithm and the result looks great, but I want to also make use of the absolute acceleration readings, so I wish to scale them accordingly.

Here's a picture of my chip:

Image removed.

Here's my initialisation sequence:


write(MPU6050_RA_PWR_MGMT_1, (uint8_t)((1 << MPU6050_PWR1_SLEEP_BIT) | MPU6050_CLOCK_PLL_XGYRO));
chThdSleepMilliseconds(100);

/* set full scale gyro + acc range */
write(MPU6050_RA_GYRO_CONFIG, 0x00);
chThdSleepMilliseconds(100);

write(MPU6050_RA_ACCEL_CONFIG, 0x01 << 3);
write(MPU6050_RA_PWR_MGMT_1, MPU6050_CLOCK_PLL_XGYRO);


Any ideas what might be causing this?

Thanks!
phpbb Topic ID
14217