Pixhawk 4 [FMUv5] ArduCopter 3.6.7 IMUs

When using the Pixhawk 4 with AP_Hal_ChibiOS, I noticed that only one of the three IMUs on the Pixhawk actually initialize/work. The ICM20602 and the BMI055 give me a ‘APM Failed to initialize driver’.

Is anyone else having this issue? I’ve checked the hwdef with the FMUv5 spec and the pinouts match, so IDK what else to look at.


Please paste the statustext messages sent back from the autopilot.

Particularly interested in, you know, which version of ArduPilot is running on there :slight_smile:

@peterbarker this what I see on mavproxy:

STABILIZE> APM: Initialising APM
Sensor failure: INS: unable to initialise driver
APM: Check BRD_TYPE: INS: unable to initialise driver
Sensor failure: INS: unable to initialise driver
APM: Check BRD_TYPE: INS: unable to initialise driver

This is with the dev branch:
APM: ArduCopter V3.7.0-dev (c6115f4f) APM: ChibiOS: d443078c
Also, happened on Copter-3.6.7.

Thank you.

What value does BRD_TYPE parameter have?

@OXINARF BRD_TYPE is 24. I guess that’s the same as what’s listed for fmuv5 in AP_BoardConfig.h

Yep, that looks correct. What about INS_ENABLE_MASK?

The INS_ENABLE_MASK is set to ‘2’

That’s the problem. I’m not sure how you got there, but can you try setting it to 127, reboot and check if it works?

@OXINARF I don’t see the error anymore with INS_ENABLE_MASK set to 127. If it’s set to ‘2’, shouldn’t it just use the 2nd IMU?

I guess I shouldn’t be looking at posts at 3AM :smile: Yes, you are right, I somehow read that 2 as 4, which is why I thought it was wrong.

What is the value of that parameter after initialization? Is it 1, 2 or 3? Make sure you re-download parameters.

hahaha. I do not have the pixhawk 4 with me currently :frowning:

I will update you first thing I get to work tomorrow morning.

@OXINARF when I do a param fetch through mavproxy the INS_ENABLE_MASK changes to ‘0’. Also, tried setting INS_ENABLE_MASK = 3 and then rebooted the pixhawk4 and did a param fetch and the parameter changed to ‘1’

I think I figured out what the issue is. It seems like there is no 2nd IMU (maybe?) so whenever the 2nd bit is set to ‘1’ it reverts back to zero
for example:

3 (011) it changes to 1(001)
7(111) it changes to 5(101)
2(010) it changes to 0(000) -> this is the case where it throws out an error
5(101) remains 5(101)

Going through AP_InertialSensor.cpp imu1 should be icm20689, imu2 should be icm20602 and imu 3 should be bmi055. So, the icm20602 is not working or is not present on fmuv5?

Excellent testing. I’ve just consulted Holybro’s website and indeed their latest datasheet mentions two IMUs: IMC-20689 and BMI055.

So it looks like everything is OK with your flight controller - they probably changed their second IMU, it’s actually something quite common to happen.

Just one last think: unless you are doing specific testing, I recommend setting INS_ENABLE_MASK to 127, that’s the default value and makes all drivers try to load.

1 Like

Thank you @OXINARF. I will set INS_ENABLE_MASK to 127