-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Describe the bug
When I used AQM0802-based LCD on Pi 5 with kernel 6.6.20, it often stops responding to the command, and then it shows nothing on LCD.To make the LCD work again, I have to turn off the LCD.
When I using Pi 4 with kernel 6.1.0/6.6.20 or Pi 5 with kernel 6.1.0, such problem does not take place.
This problem might relate to the issues #5784 and #5988 .
And the pull request #6050 did not affect this issue.
To see what is happening, I observed the SCL and SDA signals with oscilloscope when sending the setting comands to LCD. The results are shown below.
Figure (A) and (B) show successful results with Pi 5 (6.1.0) and Pi 4 (6.6.20).
Figure (A) on Pi 5 (6.1.0) shows two noisy pulses at the edges of ACK, but they do not affect the I2C communication.
On the other hand, Figure (C) shows the failure result with Pi 5 (6.6.20).
Around t=0.0007, a pluse during ACK signal is observed, and it stops I2C communication.
Figure (C) around t=0.0007 is enlarged below.
When this failure takes place, dmesg shows the follwing error.
[ 161.891681] i2c_designware 1f00074000.i2c: i2c_dw_handle_tx_abort: lost arbitration
After that, I2C communications show the following errors.
[ 189.544399] i2c_designware 1f00074000.i2c: controller timed out
In such a situation, "i2cdetect -y 1" show the following result.
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: -- -- -- -- -- -- -- -- 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77
To recover from this failure, I have to turn off and on the LCD.
This failure takes place randomly, but the failure probability seems to depend on the command.
In the above figure, the command "0x6c" has a high probability to fail.
When I decrease the I2C frequency (such as i2c_baudrate=50000),
the failure probability also decrease, but I could not make it zero.
Steps to reproduce the behaviour
Connecting AQM0802-based LCD on Pi 5, and sending the setting commands such as:
bus.write_i2c_block_data(0x3e, 0x00, [0x38, 0x39, 0x14, 0x70, 0x56, 0x6c])
Device (s)
Raspberry Pi 5
System
Raspberry Pi 5 Pi 5 with kernel 6.6.20 (Raspberry Pi OS 2024-03-15)
Logs
No response
Additional context
No response

