we are building a new drone with the Pixhawk Jetson Baseboard Bundle . When connecting to the board with QGroundControl we get an error regarding the BMM150 magnetometer “Critical: Preflight Fail: Compass Sensor 0 missing” so it seems the device is unable to talk to the mag properly.
Running “bmm150 status” shows the following output, with a continously increasing reset events counter:
INFO [SPI_I2C] Running on I2C Bus 4, Address 0x10
bmm150: reset: 32 events
bmm150: bad register: 0 events
bmm150: bad transfer: 0 events
bmm150: overflow: 0 events
bmm150: self test failed: 0 events
This is our dmesg output:
nsh> dmesg
HW arch: PX4_FMU_V6X
HW type: V6X
HW FMUM ID: 0x006
HW BASE ID: 0x100
PX4 git-hash: 1dacb4cdef2d7145754fc788fa8dc482eed74b40
PX4 version: Release 1.14.3 (17695743)
OS: NuttX
OS version: Release 11.0.0 (184549631)
OS git-hash: de41e7feaeffaec3ce65327e9569e8fdb553ca3d
Build datetime: Dec 11 2024 15:50:42
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 9.3.1 20200408 (release)
PX4GUID: 000600000000333839363033510f0029001e
MCU: STM32H7[4|5]xxx, rev. V
INFO [param] selected parameter default file /fs/mtd_params
INFO [param] importing from '/fs/mtd_params'
INFO [parameters] BSON document size 1249 bytes, decoded 1249 bytes (INT32:18, FLOAT:38)
INFO [param] selected parameter backup file /fs/microsd/parameters_backup.bson
Board architecture defaults: /etc/init.d/rc.board_arch_defaults
Board defaults: /etc/init.d/rc.board_defaults
Loading airframe: /etc/init.d/airframes/4001_quad_x
INFO [dataman] data manager file '/fs/microsd/dataman' size is 62560 bytes
INFO [px4io] IO FW CRC match
Board sensors: /etc/init.d/rc.board_sensors
INFO [ina226] Failed to init INA226 on bus 1, but will try again periodically.
ina226 #0 on I2C bus 1 (external) address 0x41
INFO [ina226] Failed to init INA226 on bus 2, but will try again periodically.
ina226 #1 on I2C bus 2 (external) address 0x41
INFO [adis16470] Serial Number: 0x3D6D, Firmware revision: 0x134 Date: Y 2022 DM 420
adis16470 #0 on SPI bus 3
iim42652 #0 on SPI bus 2 rotation 6
icm45686 #0 on SPI bus 1 rotation 10
bmm150 #0 on I2C bus 4 (external) address 0x10
WARN [SPI_I2C] ist8310: no instance started (no device on bus?)
icp201xx #0 on I2C bus 4 (external) address 0x64
bmp388 #0 on I2C bus 2 (external) address 0x76
WARN [SPI_I2C] ms5611: no instance started (no device on bus?)
ekf2 [700:237]
Starting Main GPS on /dev/ttyS0
Starting MAVLink on /dev/ttyS6
INFO [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS6 @ 57600B
Starting MAVLink on ethernet
INFO [mavlink] mode: Normal, data rate: 100000 B/s on udp port 14550 remote port 14550
INFO [rc_input] valid device required
ERROR [rc_input] Task start failed (-1)
INFO [logger] logger started (mode=all)
INFO [uavcan] Node ID 1, bitrate 1000000
NuttShell (NSH) NuttX-11.0.0
nsh> WARN [mavlink] no broadcasting address found
WARN [health_and_arming_checks] Preflight Fail: Compass Sensor 0 missing
WARN [health_and_arming_checks] Preflight Fail: Compass Sensor 0 missing
WARN [health_and_arming_checks] Preflight Fail: Compass Sensor 0 missing
We were once randomly getting it to work, being able to even calibrate the mag successfully. However, after that we were not able to find any published data like e.g. sensor_mag. When the calibration worked, the reset counter still kept on increasing.
(17761023)
OS: NuttX
OS version: Release 11.0.0 (184549631)
OS git-hash: 5d74bc138955e6f010a38e0f87f34e9a9019aecc
Build datetime: Nov 13 2024 17:35:05
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 9.3.1 20200408 (release)
PX4GUID: 000600000000353037313033510a00360020
MCU: STM32H7[4|5]xxx, rev. V
INFO [param] selected parameter default file /fs/mtd_params
INFO [param] importing from '/fs/mtd_params'
INFO [parameters] BSON document size 1423 bytes, decoded 1423 bytes (INT32:33, FLOAT:34)
INFO [param] selected parameter backup file /fs/microsd/parameters_backup.bson
Board architecture defaults: /etc/init.d/rc.board_arch_defaults
Board defaults: /etc/init.d/rc.board_defaults
Loading airframe: /etc/init.d/airframes/4019_x500_v2
INFO [dataman] data manager file '/fs/microsd/dataman' size is 68528 bytes
INFO [px4io] IO FW CRC match
Board sensors: /etc/init.d/rc.board_sensors
INFO [adis16470] Serial Number: 0x32AE, Firmware revision: 0x133 Date: Y 2021 DM 810
adis16470 #0 on SPI bus 3
iim42652 #0 on SPI bus 2 rotation 6
icm45686 #0 on SPI bus 1 rotation 10
bmm150 #0 on I2C bus 4 (external) address 0x10
WARN [SPI_I2C] ist8310: no instance started (no device on bus?)
icp201xx #0 on I2C bus 4 (external) address 0x64
bmp388 #0 on I2C bus 2 (external) address 0x76
WARN [SPI_I2C] ms5611: no instance started (no device on bus?)
WARN [vehicle_angular_velocity] no gyro selected, using sensor_gyro_fifo:0 2818066
ekf2 [587:237]
Board mavlink: /etc/init.d/rc.board_mavlink
Starting Main GPS on /dev/ttyS0
Starting MAVLink on /dev/ttyS6
INFO [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS6 @ 57600B
Starting MAVLink on ethernet
INFO [mavlink] mode: Normal, data rate: 100000 B/s on udp port 14550 remote port 14550
Starting UXRCE-DDS Client on ethernet
INFO [uxrce_dds_client] init UDP agent IP:10.41.10.1, port:8888
INFO [cdcacm_autostart] Starting CDC/ACM autostart
WARN [mavlink] no broadcasting address found
INFO [logger] logger started (mode=all)
INFO [uavcan] Node ID 1, bitrate 1000000
NuttShell (NSH) NuttX-11.0.0
Any modules you have added or is this a custom firmware?
We used the default 1.15.0 build from Github and also built the 1.15.2 from source but without any changes. Are we right in thinking that without any previous parameters setup the device should be able the detect the sensors automatically?
I added some debug messages to BMM150.cpp with the following result:
DEBUG 101922041 CUSTOM: RUNIMPL with state SELF_TEST_CHECK
DEBUG 101932546 CUSTOM: RUNIMPL with state RESET
DEBUG 101943003 CUSTOM: RUNIMPL with state WAIT_FOR_RESET
DEBUG 101955380 CUSTOM: RUNIMPL with state SELF_TEST_CHECK
DEBUG 102055906 CUSTOM: RUNIMPL with state SELF_TEST_CHECK
...
DEBUG 102659086 CUSTOM: RUNIMPL with state SELF_TEST_CHECK
ERROR [vehicle_magnetometer] MAG #0 failed: TIMEOUT!
DEBUG 103765001 CUSTOM: RUNIMPL with state SELF_TEST_CHECK
...
DEBUG 103865554 CUSTOM: RUNIMPL with state SELF_TEST_CHECK
DEBUG 104983784 CUSTOM: RUNIMPL with state RESET
DEBUG 104994119 CUSTOM: RUNIMPL with state WAIT_FOR_RESET
DEBUG 105006512 CUSTOM: RUNIMPL with state SELF_TEST_CHECK
...
The devices cycles between self test check and reset over and over again, leading me to believe this is a hardware issue. Is this assumption valid?