STM32F446 I2C connection, weird behaviour with MPU6050 and HMC5883L
Hello everyone,
I'm trying to use MPU6050, HMC5883L and MS5611 all together in a project with an STM32F446RE. The problem is, while every components all work fine alone, when is use MPU6050 and HMC5883L together, it doesn't work. By not working, I'm meaning that the datas collected are all wrong. What's also weird is that : MPU6050 and MS5611 work fine together, same for HMC5883L and MS5611.
So let's focus on MPU6050 and HMC5883L only I guess...
For the connections I just did that :

So in my case, I connect the two sensors to the same SCL and SDA. Which should work, but I suspect that the problem might come from this connection. Indeed, even thought I'm assuming the right addresses are written in the code, could it be possible that troughout I2C, parts of the data are overwritten ? If so, what can I do ?
If you have any other ideas of where the problem could be, feel free to share it ^^
I attached all the code i use.
Thanks for your help !



