7inch Quadcopter AC 4.1.0-Beta5 : Dual barometer DPS310 : I2C + UAVCAN : Error: compass not healthy

Hello,

I have build a 7 inch LongRange quadcopter using :

  • Armattan Chameleon TI LR carbon frame
  • Matek H743 SLIM running Arducopter 4.1.0-beta5 with bidir dshot firmware (with DPS310 barometer)
  • Matek M9N-f4-3100 as UAVCAN runing latest AP_PERIPH firmware, connected with CAN bus (with secondary DPS310 barometer) .
  • ESC : T-Motor F55A Pro II T-Motor - 3/6S -BLHeli_32 4in1 MCU F3
  • Xing2 2506 - 1650KV motor
  • Propeler : HQ Durable Prop 7 X 3.5 X 3V1S
  • External GPS & COMPASS : M9N-5883
  • External Lidar + Flow Sensor : Matek 3901-L0X
  • RC : TBS CrossFire Nano RX with Yaapu script telemetry running on TX16S
  • LIPO Battery Tattu 1800mha 100C

This setup allow Dual Compas, dual GPS ( internal + UAVCAN devices), but if BAROMETER is enabled in the AP_PERIPH / Matek M9N-f4-3100, the AC-4.1 (running on Matek H743 SLIM) raise a critical error : compass not healthy at boot time. Calibrating barometer doesn’t solve the issue.
BARO2_DEVID get a ID value, so the UAVCAN barometer is detected at boot time. Changing BARO_PRIMARY from 0 (default) to 1 doesn’t solve the issue.

Using the uavcan_gui_tool, i can dump the messages from the AP_PERIPH and there is valid BAROMETER PRESSURE + TEMPERATURE data.

static_pressure: 98273.320312  ( seems coherent with press_abs at 982.698 from mavlink from sensor from main barometer located on Matek H743 SLIM )
static_pressure_variance: 0.0000

static_temperature: 304.7500 ( in kevlin so it means 30,85°C)
static_temperature_variance: 0.0000

I have to disable BAROMETER on AP_PERIPH (BARO_ENABLE=0) to clear to error and being able to fly…

Does anyone have any idea ? it looks like a software issue in AC-4.10-beta5…

@tridge is this the CAN id issue you were running into?

Does anyone has a pointer to the faulty code source ? Or any patch to make more test & fix ?

can you set LOG_DISARMED=1 and get a log of the problem?

Sorry for the delay. Here is the bin log : https://drive.google.com/file/d/1bc7xSige7MA6e51UmZmy8k6pLTQxDt1-/view?usp=sharing

I confirm the issue : “PreArm: Barometer not healthy” when BARO_ENABLE=1 on AP_Periph.

Log Messages :
1970-01-01 01:00:08.543 ArduCopter V4.1.0-beta5 (98c73a0b)
1970-01-01 01:00:08.543 ChibiOS: 08877972
1970-01-01 01:00:08.543 MatekH743-bds 0027001C 33395105 3338393
1970-01-01 01:00:08.543 Param space used: 1633/4096
1970-01-01 01:00:08.543 RC Protocol: CRSF
1970-01-01 01:00:08.543 New mission
1970-01-01 01:00:08.543 New rally
1970-01-01 01:00:08.543 Frame: QUAD/X
1970-01-01 01:00:08.572 VTX: A1 5865MHz, PWR: 25mW
1970-01-01 01:00:09.439 EKF3 IMU0 buffs IMU=19 OBS=7 OF=17 EN:17 dt=0.0120
1970-01-01 01:00:09.439 EKF3 IMU1 buffs IMU=19 OBS=7 OF=17 EN:17 dt=0.0120
1970-01-01 01:00:10.002 CRSF: RF mode 2, rate is 130Hz
1970-01-01 01:00:10.439 EKF3 IMU0 initialised
1970-01-01 01:00:10.439 EKF3 IMU1 initialised
1970-01-01 01:00:10.441 AHRS: EKF3 active
1970-01-01 01:00:11.914 EKF3 IMU0 tilt alignment complete
1970-01-01 01:00:11.914 EKF3 IMU1 tilt alignment complete
1970-01-01 01:00:12.011 EKF3 IMU0 MAG0 initial yaw alignment complete
1970-01-01 01:00:12.012 EKF3 IMU1 MAG0 initial yaw alignment complete
1970-01-01 01:00:12.012 Event: DATA_EKF_YAW_RESET
1970-01-01 01:00:14.676 GPS 1: detected as u-blox at 230400 baud
1970-01-01 01:00:16.212 CAN[113] IERR 0x800 249
1970-01-01 01:00:18.384 CRSF: RF mode 2, rate is 156Hz
1970-01-01 01:00:18.435 CAN[113] GPS 1: detected as u-blox at 230400 baud
1970-01-01 01:00:18.437 GPS 2: specified as UAVCAN1-113
1970-01-01 01:00:21.227 CAN[113] IERR 0x800 249
1970-01-01 01:00:23.537 PreArm: Barometer not healthy
1970-01-01 01:00:26.228 CAN[113] IERR 0x800 249
1970-01-01 01:00:29.456 u-blox 1 HW: 00190000 SW: EXT CORE 4.04 (7f89f7)
1970-01-01 01:00:31.232 CAN[113] IERR 0x800 249
1970-01-01 01:00:33.010 CAN[113] u-blox 1 HW: 00190000 SW: EXT CORE 4.04 (7f89f7)
1970-01-01 01:00:36.241 CAN[113] IERR 0x800 249
1970-01-01 01:00:41.248 CAN[113] IERR 0x800 249
1970-01-01 01:00:46.061 ArduCopter V4.1.0-beta5 (98c73a0b)
1970-01-01 01:00:46.061 ChibiOS: 08877972
1970-01-01 01:00:46.062 MatekH743-bds 0027001C 33395105 3338393
1970-01-01 01:00:46.062 RCOut: DS1200:1-4 PWM:5-13
1970-01-01 01:00:46.062 IMU0: fast sampling enabled 8.0kHz/2.0kHz
1970-01-01 01:00:46.062 Frame: QUAD/X
1970-01-01 01:00:46.255 CAN[113] IERR 0x800 249
1970-01-01 01:00:51.261 CAN[113] IERR 0x800 249
1970-01-01 01:00:53.537 PreArm: Barometer not healthy
1970-01-01 01:00:56.269 CAN[113] IERR 0x800 249
1970-01-01 01:01:01.276 CAN[113] IERR 0x800 249
1970-01-01 01:01:06.283 CAN[113] IERR 0x800 249
1970-01-01 01:01:11.290 CAN[113] IERR 0x800 249
1970-01-01 01:01:16.297 CAN[113] IERR 0x800 249
1970-01-01 01:01:21.304 CAN[113] IERR 0x800 249
1970-01-01 01:01:23.585 PreArm: Barometer not healthy
1970-01-01 01:01:26.312 CAN[113] IERR 0x800 249
1970-01-01 01:01:31.319 CAN[113] IERR 0x800 249
1970-01-01 01:01:36.327 CAN[113] IERR 0x800 249
1970-01-01 01:01:41.334 CAN[113] IERR 0x800 249
1970-01-01 01:01:46.341 CAN[113] IERR 0x800 249
1970-01-01 01:01:51.348 CAN[113] IERR 0x800 249
1970-01-01 01:01:53.591 PreArm: Barometer not healthy
1970-01-01 01:01:56.354 CAN[113] IERR 0x800 249

BTW, any idea of the meaning/reason of IERR 0x800 249 message…??? Internal Error 0x800 is related to “watchdog_reset”

I just set one up and had some strange issue. I recommend using or trying another FC right now.

Temperature of 2nd sensor is quiet high (M9N-f4-3100) compare to the first (Matek H743 SLIM):
394: SCALED_PRESSURE {time_boot_ms : 718424, press_abs : 979.97265625, press_diff : 0.0, temperature : 3760, temperature_press_diff : 0}
394: SCALED_PRESSURE2 {time_boot_ms : 718424, press_abs : 979.9297485351562, press_diff : 0.0, temperature : 7549, temperature_press_diff : 0}

The Matek H743 SLIM runing AC4.1 alone works fine. But the barometer from AP_Periph via CAN has an issue at boot time.
Do you have any working Dual Barometer setup with AC 4.1 + AP_Periph ? if so what is your hardware ?

Yea sorry I could not get that far on the build I tossed the FC in the bin. Matek H743 SLIM.

Just tested witth ArduCopter V4.1.0-beta8 (9ac9b21e) => Issue not solved, same behaviour.
Also tried to upgrade AP_Periph with latest binary (2021-09-01) => Unable to communicate with AP_Periph with uavcan_gui_tool, I had to rollback to release from 16th of july : GIT
5f039ba06d9a8347d405ca767cefa7a1ed89f97d