cancel
Showing results for 
Search instead for 
Did you mean: 

I'm getting some weird I2C behavior with a GY-87 (MPU6050, HMC5883L, and BMP180 sensor)

CBret.1
Associate

Whats happening is when I probe the WHO_AM_I register on the MPU6050 I am getting a weird response of 0x72 instead of 0x68. This does not happen on a generic MPU6050 only board. Any ideas? the code in question is simply "HAL_I2C_Mem_Read (&hi2c1, MPU6050_ADDR,WHO_AM_I_REG,1, &check, 1, 1000);" returning the weird value.... :( Any ideas? (I believe I have the I2C set up correctly on my STM32F411CEU6 (Black pill)).

1 REPLY 1

How is this STM32-related?

Check return value from calling Cube/HAL function.

Observe data on pins using logic analyzer to exclude error in Cube/HAL or its usage.

Check if the symbols you are using (MPU6050_ADDR, WHO_AM_I_REG) have the value you expect.

JW