Hi
Were you able to resolve this? I am in a similar position - I want to design a custom PCB with IMU, baro etc, so I decided to test various parts using OBAL and Ardupilot running on a Pi Zero W 2.
As recommended on the OBAL site, I first had good results using an MPU9250 breakout board, but this part is no longer manufactured, and the ICM-20948 offered in its place. I had a Waveshare PICO-10DOF_IMU on hand, so i tried that. Eventually I got it configured to connect on the I2C bus using (in linux.h):
// Waveshare Pico 10-DOF IMU Connection on I2C
#ifdef HAL_BOARD_SUBTYPE_LINUX_OBAL_V1_PICO_10_DOF
#define HAL_INS_PROBE_LIST PROBE_IMU_I2C(Invensensev2, 1, 0x68, ROTATION_NONE)
#define HAL_MAG_PROBE_LIST ADD_BACKEND(DRIVER_ICM20948, AP_Compass_AK09916::probe_ICM20948_I2C(0, ROTATION_PITCH_180))
#define HAL_BARO_PROBE_LIST PROBE_BARO_I2C(LPS2XH, 1, 0x5C)
#endif
[please note: rotations may not be correct]
The artificial horizon in QGC looked weirdly laggy and wrong, however.
I wondered if this was because the ICM-20948 was running much more slowly over I2C, compared to the MPU9250 on SPI, so I hacked the Waveshare board to connect on SPI and used:
// ICM-20948 IMU Connection on SPI
#ifdef HAL_BOARD_SUBTYPE_LINUX_OBAL_V1_ICM_20948_SPI
#define HAL_INS_PROBE_LIST PROBE_IMU_SPI(Invensensev2, "icm20948", ROTATION_NONE)
#define HAL_MAG_PROBE_LIST PROBE_MAG_IMU(AK09916, ICM20948, 0, ROTATION_NONE)
#endif
So far, however, whoami() on the ICM-20948 is returning 0x00, so the IMU initialisation is failing.
I tested SPI on the Pi Zero using spidev-test (I didn’t know about it - thanks for that ) and it seems fine.
There seems to be a lot of code to support the ICM-20948, but it’s also NRND. It seems like 9 DoF sensors are getting harder to find since the chip shortages.