I am using a ms5837 pressure sensor (https://www.te.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Data+SheetMS5837-30BAB1pdfEnglishENG_DS_MS5837-30BA_B1.pdfCAT-BLPS0017) with a Pixhawk 4 and the PX4 firmware. If there are no disturbances, the driver works fine. however if the I2C cables get close to a telemetry receiver, the SCL data line gets stuck on low voltage, and the Pixhawk becomes unresponsive. I tried firmware versions 1.8.2 and 1.9.0beta. The SCL line keeps being stuck low, once the pressure sensor is unplugged.
On the right is a working transimition of a message, on the left, the same message, but at that moment the scl gets stuck and the pixhawk stops responding. (always seems to happen, once a response , in this case an Ack from the sensor is expected)
@MarcRauch thanks for reporting this! The fact that I2C can be perturbed is expected, it is not supposed to be used with long wiring or electrical interference. However, the fact that everything gets stuck is obviously not acceptable.
@david_s5 this is interesting! I believe you have been looking into the fact that everything gets “stuck”.
thanks for the answer @JulianOes. Yes, I can life with some bad/incomplete measurements, however the Pixhawk should not get stuck mid flight.
I managed to track the issue to the function I2C_TRANSFER in src/lib/drivers/device/nuttx/I2C.cpp. (by inserting PX4_INFO statements right before, and after I2C_TRANSFER. The Pixhawk always died between those two statements)