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.
@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:
If i set INS_ENABLE_MASK to
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.