It is not clear from your question what hardware module and external magnetometer you are using. The mbed MPU9250 lib refers to an AK8963. This device could be connected to the MPU9250 aux I2C bus and should then have a different address when you have two MPU9250/AK8963 pairs on the same bus. However, the AK8963 does in fact support 4 I2C slave addresses which can be selected through CAD1 and CAD0:
CAD1 CAD0 address
VSS VSS 0 0 0 1 1 0 0 R/W
VSS VDD 0 0 0 1 1 0 1 R/W
VDD VSS 0 0 0 1 1 1 0 R/W
VDD VDD 0 0 0 1 1 1 1 R/W
As long as your hardware allows you to change the CAD bits you should be able to use them.
The MPU-9250 lib also needs a modification to make sure you select the correct AK8963 address. Currently it is hardcoded to 0x18 (ie 0x0C <<1)
Hi everyone,
I have a problem. I use two MPU9250 with two different i2c addresses by using the pin AD0. Here, it's okay. I can get data from this two IMUs but the problem is located on the magnetometer's address.
It seems there is a conflict when the two MPU9250 get data with their magnetometer. As we can't change the magnetometer's address, i think that the two MPU9250 have to use the same magnetometer and not their own magnetometers.
Is there a way to unlock the situation without using a multiplexer please ? Thanks.