Hi, I have an old pixhawk with a faulty LSM303d, however the MPU6050 (or is is 6k?) is working just fine. In the old AHRS I used to be able to choose active IMU, however when trying to set EK2_IMU_MASK on APM3.8.4 to other value than the default 3 I stop being able to connect to the board after reboot until I overwrite firmware.
Also, wiki about this topic is a bit confusing:

That should work although I don’t have a board with a broken IMU to test.

Re the wiki explanation, perhaps the confusion comes from the Bit number vs the parameter value.

Setting Bit0 to 1 will add “1” to the param value.
Setting Bit1 to 1 will add “2” to the param value.
Setting Bit3 to 1 will add “4” to the param value.

If the parameter value is “7” then Bit0, Bit1 and Bit2 are all “1”.

Maybe I’m telling you something you already know but just in case…

EDIT: I tested setting EK2_IMU_MASK to “1” and “2” and tested that with each value the board came up OK. I didn’t immediately notice any issues but of course, this is not the same situation as you’ve reported.

As a side note, I wonder if perhaps you don’t need to change the EK2_IMU_MASK. Perhaps if the IMU is bad and is never coming up, ArduPilot is only registering one IMU so if you calibrate it, it will be fine. I.e. maybe it has no idea that there should be another IMU. Sorry, as a senior AP developer I should know this but I don’t spend much time at the driver level.

Randy, LSM303D is actually fine, its just that there is an old bug in the clonehawk hardware which sometimes prevent lsm3035 corect power down after which it will output single bad value upon next power up. The only hardware fix is to manually short gnd 5v rails after battery disconnect. This would discharge all onboard caps and lsm303d would get powered off and restart correctly. (I’ve actually was the one who dound the cause and the fix on diyd a couple of years ago) https://diydrones.com/forum/topics/solution-proposal-for-pixhawk-imu2-related-bad-accell-health?xg_source=activity

The *hawk in question was sitting in my parts bin for at least 1.5 years and I’ve decided to try to use it