I’m contemplating a board design that is based on the FMU-v5, but uses the SPI and I2C buses slightly differently.
In boards/px4/fmu-v5/src/spi.cpp
and boards/px4/fmu-v5/src/i2c.cpp
some buses are defined as extern, and some ans internal.
I’m wondiering why this is needed - What is the software doing differently between the two?
Sensors in the startup script have often the argument -X
which means it will try to find that sensors on all external I2C buses. So marking them as internal or external is basically a hint for the software/startup about where to look for connected devices.
Additionally, it allows filling out the information if a sensor is “external”. For instance for magnetometers it means we can’t assume the orientation of the sensor but might have to adjust the orientation using a parameters. Plus, we can likely trust an external magnetometers as they are often further away from interference on a GPS stand.
1 Like