Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3862

Interfacing (DSI, CSI, I2C, etc.) • I2C devices get randomly disrupted

$
0
0
Hello,
we have a heating/cooling system based on RPi 3B+. It controls the compressor and heater through digital pins based on several DS18B20 temperature sensors. There is also one SHT31 sensor to track the humidity. Device has a standard 7" LCD via DSI.

However, randomly (rarely - about once a day maximally), turning on the compressor causes a disturbance of the devices connected on the I2C bus - either the LCD goes off or SHT31 sensor stops measuring. Sometimes one of them, sometimes both of them. Other devices are not affected. Probably some electric pulse?

When this happens, the kernel log starts to be filled with the following errors and there is no way to make it working again. Neither reboot helps. We must completely power the device off.
Jun 08 00:05:10 komora-pi kernel: edt_ft5x06 10-0038: Unable to fetch data, error: -121
Jun 08 00:05:10 komora-pi kernel: edt_ft5x06 10-0038: Unable to fetch data, error: -5
Jun 08 00:05:48 komora-pi kernel: [drm:dsi_handle_error.part.0 [vc4]] *ERROR* DSI1: LP0 contention error
Jun 08 00:09:01 komora-pi kernel: edt_ft5x06 10-0038: Unable to fetch data, error: -121
Jun 08 00:09:02 komora-pi kernel: edt_ft5x06 10-0038: Unable to fetch data, error: -5
...
Jun 08 02:55:10 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:12 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:14 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:15 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:17 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:22 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:24 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:26 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:28 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:30 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:32 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
Jun 08 02:55:33 komora-pi kernel: i2c-bcm2835 3f804000.i2c: i2c transfer timed out
During the development we discovered that accessing SHT31 sensor twice (e.g. when we run the same application again accidentally) causes exactly the same problem - a lot of "i2c transfer timed out" errors in kernel logs and unable to recover without complete power off.

Is there some possibility to initiate I2C devices restart without powering off the RPi completely? (So we could implement some kind of watchdog that does it automatically?)

It seems that restarting touch driver makes LCD working again. But we must verify if it is true or just by accident:
sudo rmmod edt_ft5x06
sudo insmod /lib/modules/6.1.21-v7+/kernel/drivers/input/touchscreen/edt-ft5x06.ko.xz
But trying to remove I2C driver via
sudo rmmod i2c-bcm2835
freezes forever

Statistics: Posted by kolsi — Mon Jun 10, 2024 7:02 am



Viewing all articles
Browse latest Browse all 3862

Trending Articles