As long as I remember, INS_ENABLE_MASK=2
makes the rest of the system pretend that your second IMU is the one and only IMU.
(Please devs correct me if I am too wrong) Basically, at startup the system enumerates all the IMU entries listed in hwdef
, in order, and the following happens for the i-th entry:
- if the i-th bit in
INS_ENABLE_MASK
is 0, the iteration is skipped; - the driver written in that entry is initialized for the pins specified in that entry;
- if the initialization sequence succeeds, the IMU is considered existing, and it receives an index (first IMU that came alive becomes first, the second one becomes second, etc).
If you disable your first IMU through INS_ENABLE_MASK
, EKF3 will see only the enabled one (which will have bit index of 0), and it will start only one EKF core, etc. So this seems to be the ideal solution to your problem.