Mamba H743 Config Error: Baro: unable to initialise driver

Hi.

I am trying to get ArduCopter running on Mamba H743 MK4, but run into various issues. For instance, it doesn’t detect the barometer and fails. The FC itself is not defective and works fine with iNav. As I know, different versions of this board have different hardware. Mine has the SPL06 barometer according to iNav: https://imgur.com/a/DdrTxgQ

Here’s the log:
07/07/2023 08:06:18 : Config Error: Baro: unable to initialise driver
07/07/2023 08:06:18 : Config Error: fix problem then reboot
07/07/2023 08:06:13 : Config Error: Baro: unable to initialise driver
07/07/2023 08:06:13 : Config Error: fix problem then reboot
07/07/2023 08:06:12 : motors not allocated
07/07/2023 08:06:12 : RCOut: Initialising
07/07/2023 08:06:12 : MambaH743v4 0033003D 3230510A 33343930
07/07/2023 08:06:12 : ChibiOS: 1ec9f168
07/07/2023 08:06:12 : ArduCopter V4.4.0-beta3 (3c4abe46)
07/07/2023 08:06:11 : motors not allocated
07/07/2023 08:06:11 : RCOut: Initialising
07/07/2023 08:06:11 : MambaH743v4 0033003D 3230510A 33343930
07/07/2023 08:06:11 : ChibiOS: 1ec9f168
07/07/2023 08:06:11 : ArduCopter V4.4.0-beta3 (3c4abe46)
07/07/2023 08:06:11 : motors not allocated
07/07/2023 08:06:11 : RCOut: Initialising
07/07/2023 08:06:11 : MambaH743v4 0033003D 3230510A 33343930
07/07/2023 08:06:11 : ChibiOS: 1ec9f168
07/07/2023 08:06:11 : ArduCopter V4.4.0-beta3 (3c4abe46)

Additionally, the Mission Planner hangs when trying to calibrate accelerometer, then disconnects and can’t connect again with the “Connect Failed” error until I reboot the FC. Log: https://imgur.com/a/0BUvROC

Is my FC supported by ArduCopter? And if so, how do I get it to work? Can you manually select the barometer type somewhere in the settings or is it hard-coded for each FC?

Someone did a PR for this which we should try and get into beta4 @rmackay9

Its on the 4.4 list - hopefully it will get pulled through - AP_HAL_ChibiOS: add SPL06 to MambaH743v4 by mikhail-kgd · Pull Request #24123 · ArduPilot/ardupilot · GitHub

I guess this change should already be available in the 4.5.0-dev build? Same issue on it though. How do I debug it from here?

07/07/2023 19:26:37 : Config Error: Baro: unable to initialise driver
07/07/2023 19:26:37 : Config Error: fix problem then reboot
07/07/2023 19:26:32 : Config Error: Baro: unable to initialise driver
07/07/2023 19:26:32 : Config Error: fix problem then reboot
07/07/2023 19:26:27 : Config Error: Baro: unable to initialise driver
07/07/2023 19:26:27 : Config Error: fix problem then reboot
07/07/2023 19:26:22 : Config Error: Baro: unable to initialise driver
07/07/2023 19:26:22 : Config Error: fix problem then reboot
07/07/2023 19:26:17 : Config Error: Baro: unable to initialise driver
07/07/2023 19:26:17 : Config Error: fix problem then reboot
07/07/2023 19:26:12 : Config Error: Baro: unable to initialise driver
07/07/2023 19:26:12 : Config Error: fix problem then reboot
07/07/2023 19:26:07 : Config Error: Baro: unable to initialise driver
07/07/2023 19:26:07 : Config Error: fix problem then reboot
07/07/2023 19:26:02 : Config Error: Baro: unable to initialise driver
07/07/2023 19:26:02 : Config Error: fix problem then reboot
07/07/2023 19:25:57 : Config Error: Baro: unable to initialise driver
07/07/2023 19:25:57 : Config Error: fix problem then reboot
07/07/2023 19:25:52 : Config Error: Baro: unable to initialise driver
07/07/2023 19:25:52 : Config Error: fix problem then reboot
07/07/2023 19:25:47 : Config Error: Baro: unable to initialise driver
07/07/2023 19:25:47 : Config Error: fix problem then reboot
07/07/2023 19:25:42 : Config Error: Baro: unable to initialise driver
07/07/2023 19:25:42 : Config Error: fix problem then reboot
07/07/2023 19:25:37 : Config Error: Baro: unable to initialise driver
07/07/2023 19:25:37 : Config Error: fix problem then reboot
07/07/2023 19:25:32 : Config Error: Baro: unable to initialise driver
07/07/2023 19:25:32 : Config Error: fix problem then reboot
07/07/2023 19:25:27 : Config Error: Baro: unable to initialise driver
07/07/2023 19:25:27 : Config Error: fix problem then reboot
07/07/2023 19:25:22 : Config Error: Baro: unable to initialise driver
07/07/2023 19:25:22 : Config Error: fix problem then reboot
07/07/2023 19:25:17 : Config Error: Baro: unable to initialise driver
07/07/2023 19:25:17 : Config Error: fix problem then reboot
07/07/2023 19:25:12 : Config Error: Baro: unable to initialise driver
07/07/2023 19:25:12 : Config Error: fix problem then reboot
07/07/2023 19:25:12 : motors not allocated
07/07/2023 19:25:12 : RCOut: Initialising
07/07/2023 19:25:12 : MambaH743v4 0033003D 3230510A 33343930
07/07/2023 19:25:12 : ChibiOS: 349ad50b
07/07/2023 19:25:12 : ArduCopter V4.5.0-dev (d9866683)
07/07/2023 19:25:12 : motors not allocated
07/07/2023 19:25:12 : RCOut: Initialising
07/07/2023 19:25:12 : MambaH743v4 0033003D 3230510A 33343930
07/07/2023 19:25:12 : ChibiOS: 349ad50b
07/07/2023 19:25:12 : ArduCopter V4.5.0-dev (d9866683)
07/07/2023 19:25:11 : motors not allocated
07/07/2023 19:25:11 : RCOut: Initialising
07/07/2023 19:25:11 : MambaH743v4 0033003D 3230510A 33343930
07/07/2023 19:25:11 : ChibiOS: 349ad50b
07/07/2023 19:25:11 : ArduCopter V4.5.0-dev (d9866683)

Should be - can you use devop - Direct Comms with SPI/I2C bus — MAVProxy documentation - to probe the baro and see what it is?

Could you please guide me a little further?

According to https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL_ChibiOS/hwdef/MambaH743v4/hwdef.dat I assume that the barometer is sitting on the I2C bus #0 at the 0x76 address.

However, the “devop read” command requires 5 arguments:
devop read <spi|i2c> name bus address regstart count

What should the name, regstart and count be in my case?

I tried entering the following, but with no success:

STABILIZE> module load devop
Loaded module devop
STABILIZE> devop read i2c PRESS 0 0x76 0x00 1
Operation 1 failed: 4 (transfer failed)
STABILIZE>

Additionally, I am experiencing some heavy connection issues. I have to reconnect the USB cable or restart the programs multiple times before I can finally connect to the FC via Mission Planner or MAVProxy:

Auto-detected serial ports are:
COM4 : MambaH743v4 (COM4) : USB VID:PID=1209:5741 SER=3D0033000A51303230393433 LOCATION=1-2
Connecting to COM4 : MambaH743v4 (COM4) : USB VID:PID=1209:5741 SER=3D0033000A51303230393433 LOCATION=1-2
Connect COM4 source_system=255
Failed to connect to COM4 : [Errno 13] Permission denied: 'COM4'

Or sometimes:

Auto-detected serial ports are:
COM4 : MambaH743v4 (COM4) : USB VID:PID=1209:5741 SER=3D0033000A51303230393433 LOCATION=1-2
Connecting to COM4 : MambaH743v4 (COM4) : USB VID:PID=1209:5741 SER=3D0033000A51303230393433 LOCATION=1-2
Connect COM4 source_system=255
Loaded module console
Running script (C:\Users\user\AppData\Local\.mavproxy\mavinit.scr)
Loaded module help
Unknown command 'graph timespan 30'
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from COM4
Device COM4 is dead
Device COM4 reopened OK
Detected vehicle 1:1 on link 0
Received 1066 parameters (ftp)
Saved 1066 parameters to mav_0_1.parm
Received 1066 parameters (ftp)
Saved 1066 parameters to mav.parm
Exception in thread main_loop:
Traceback (most recent call last):
  File "threading.py", line 1016, in _bootstrap_inner
  File "threading.py", line 953, in run
  File "mavproxy.py", line 1096, in main_loop
  File "serial\serialutil.py", line 594, in inWaiting
  File "serial\serialwin32.py", line 259, in in_waiting
serial.serialutil.SerialException: ClearCommError failed (PermissionError(13, 'The device does not recognize the comman)
STABILIZE>

Can all this be related somehow?

Something like

devop read i2c BARO 0 0x76 0x00 10

if it can’t read anything then that’s an indication that the bus or address are wrong. I can’t remember whether the bus is indexed from 0 or 1

No luck:

STABILIZE> module load devop
Loaded module devop
STABILIZE> devop read i2c BARO 0 0x76 0x00 10
Operation 1 failed: 4 (transfer failed)
STABILIZE> devop read i2c BARO 1 0x76 0x00 10
Operation 2 failed: 4 (transfer failed)
STABILIZE> devop read i2c BARO 2 0x76 0x00 10
Operation 3 failed: 2 (No such bus/device)

I’m starting to believe it’s a connection issue of some sort.

You can try address 0x77 as well - there are some baros with this address

No luck. I believe something is very wrong with the firmware: no hardware is detected, devop not working properly…

I guess I will have to ask diatone for their latest update

One thing to note. These boards are known to have power issues when running on USB - in particular there is often not enough power on i2c if you have other things connected. If you are only testing on USB it is worth connecting a battery to see if the problem goes away.

Thank you! Can confirm that the 4.5.0-latest works with the battery plugged in.

1 Like