-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rock Pi S: Two simultaneous accesses to the same i2c device breaks the bus #292
Comments
Sounds like a kernel bug to me. Do you have a simple C program to help us reproduce this issue? |
This is a simple example (designed for SHT31 on address 0x44) that breaks it immediately by accessing the same device in two threads at the same time.
|
@BigMuscle85 I tried the sample program you posted to communicate with an i2c device via i2c-1, but I didn't reproduce the i2c bus being corrupted. You can also try this software version (the kernel is also version 6.1.68): https://github.com/radxa-build/rock-pi-s/releases/download/b40/rock-pi-s_debian_bookworm_cli_b40.img. xz |
@RadxaMitchell I'll try to figure out what the problem might be. But now I can say that the same problem appears even with RPi3B+ so definitely not Radxa/Rockchip issue. Even after reboot only a bunch of errors:
The board has several DS18B20 (onewire) sensors and one SHT31 connected. I cannot say if it happens for other I2C devices too. |
I came into weird issue. We have Rock Pi S (kernel 6.1.68-1-stable, image buitl with rbuild) and connected SHT31 temperature/humidity sensor to I2C1 (address 0x44). It works correctly when reading with our C++ application. But when we (e.g. accidentally) run the application twice, I2C bus gets completely broken. Then it is not possible to access I2C bus anymore, neither after restarting the application, neither after "sudo reboot". We must completely disconnect the power from the board to make it work again.
When this happens, kernel log starts to be filled with the same error message infinitely even after reboot:
It happens every time when the sensor on I2C is accessed by two applications at the same time. I understand that more simultaneous accesses won't work but it should not break the I2C bus completely.
I tried unbind/bind via "echo ff050000 | sudo tee /sys/bus/platform/drivers/rk3x-i2c/unbind" but it does not help.
Any ideas? Or at least, how to fix the problem without the need to disconnect the power?
The text was updated successfully, but these errors were encountered: