betaflight
betaflight copied to clipboard
Conflict on internal and external I2C devices using same I2C address
Describe the bug
As per title. Internal baro is a BMP280. Magnetometer is detected.
Using GEP-M1025-MI barometer MS5611 and magnetometer IST8310 are detected.
To Reproduce
Flash master and include magnetometers define.
Expected behavior
Detect baro on external module
Support ID
2dd928b4-b734-4a6a-bcf8-b48c5687b56b
Flight controller
SPEEDYBEEF7V3
Other components
Only SpeedyBee F7 V3 BL32 50A 30x30 Stack on lab power with mentioned module.
How are the different components wired up (including port information)
Using connectors - as magnetometer is working there is no wiring issue.
Add any other context about the problem that you think might be relevant here
- Tried with and without battery power.
- Setting baro_hardware or other settings does not solve the issue.
there is one USE_DSP310 typo in configs, maybe this one?
- Seems to be correct https://github.com/betaflight/config/blob/1063d83e68f01b8f69303b7de41be4f872a685bf/configs/SPEEDYBEEF7V3/config.h#L34
But MAMBAF405_2022A needs to be fixed :)
Maybe an I2C address conflict between the on-board and external baro? A quick search suggests both use 0x77, and the internal and external I2C connections are both I2C1. Not sure if this can be resolved without changing one of the device IDs or physically disconnecting the on-board baro.
Perhaps part of the design guidelines should include using separate I2C devices for on-board and external connections?
@haslinghuis : as @ot0tot said ... and don't expect either baro to work when both are connected
Perhaps part of the design guidelines should include using separate I2C devices for on-board and external connections?
Agree introducing external I2C settings would address this issue.
Perhaps part of the design guidelines should include using separate I2C devices for on-board and external connections?
Agree introducing external I2C settings would address this issue.
HI @haslinghuis i have the same issue with my GPS unit with baro GEP-M1025-DQ and KakutteH7 FC. Magnetometer is detected but both internal FC and external baro build in GPS unit is not recognised due to described above conflict. So you are saying that after implementation external I2C settings in BF would address this issue ? any development for this is scheduled ?
Won't be a software solution.
Using I2C port 1 for internal and port 2 for external devices would already make this possible. Board would need to expose pads for second port. In this way it would not conflict with duplicate devices on I2C port 1 as it would allow to choose active port for the device to be used.
Won't be a software solution.
Using I2C port 1 for internal and port 2 for external devices would already make this possible. Board would need to expose pads for second port. In this way it would not conflict with duplicate devices on I2C port 1 as it would allow to choose active port for the device to be used.
ok thanks for the information. Honestly there is no such a FC with second I2C port :( ok so to use this external baro build in GPS I need to use FC without the baro or physicaly disconnect it on the FC, right ?
ok thanks for the information. Honestly there is no such a FC with second I2C port :( ok so to use this external baro build in GPS I need to use FC without the baro or physicaly disconnect it on the FC, right ?
There are many FCs that already use separate I2C busses for on-board and external sensors.
Yes, you will need to disconnect one of the baros.
ok thanks for the information. Honestly there is no such a FC with second I2C port :( ok so to use this external baro build in GPS I need to use FC without the baro or physicaly disconnect it on the FC, right ?
There are many FCs that already use separate I2C busses for on-board and external sensors.
Yes, you will need to disconnect one of the baros.
could you give me a hint how to recognise such a FC with separate busses ? should I search in FC config.h files ?
could you give me a hint how to recognise such a FC with separate busses ? should I search in FC config.h files ?
Yes, they will have multiple I2C resources defined. Example: https://github.com/betaflight/config/blob/b98adf6f5e1acfaf4c3f9364579928cdf75a0df9/configs/JHEH743_HD/config.h#L74-L77
You will need to confirm the target resource assignments are accurate and present on the FC.
A decent manufacturer will also cover it in the manual and include it in the specs.