Pixhawk occasionally does not boot

Hello, I have a pixhawk that occasionally does not boot up. It’s not a wiring problem because it has already flown plenty of times, but just won’t boot up sometimes, with no changes to the setup. I always find a BOOT.LOG in the APM folder of the SD card, with the line “hmc5883 calibrate failed”. Would appreciate any help on solving this!

Is an external compass attached? Does it always boot if you disconnect it?

Hi, there is an external compass. I never tried disconnecting it before, but after testing it right now it seems to boot 5 out of 5 times after disconnecting the external compass.

One thing I’ve noticed that’s not mentioned in the documentation is to keep the Pixhawk absolutely still and immovable while it boots otherwise it won’t boot correctly.

Could be a bad GPS/compass module, or a bad cable to the GPS/compass module.