Skip to content
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

Will V2 support I2C clock stretching? #56

Closed
FDelporte opened this issue Jan 26, 2021 · 5 comments
Closed

Will V2 support I2C clock stretching? #56

FDelporte opened this issue Jan 26, 2021 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@FDelporte
Copy link
Member

Info provided by @thegreystone

More info on raspberrypi/linux#254 describing a bug in the I2C master.

Maybe could be fixed with i2c-gpio overlay, see https://github.com/raspberrypi/linux/blob/rpi-4.4.y/arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts

@eitch
Copy link
Member

eitch commented Jan 26, 2021

I had this issue myself when writing to an eeprom, and my solution was to set a new clkt_tout which was set in /etc/rc.local after startup. I found a howto here: https://github.com/raspihats/raspihats/blob/master/clk_stretch/i2c1_get_clkt_tout.c

Binaries are compiled and available here: https://github.com/eitch/raspi-builder/tree/develop/bin-files64

But yes we can try the overlay and see if that solves the issue too.

@eitch
Copy link
Member

eitch commented Jun 9, 2021

@FDelporte With the linuxfs-i2c plugin, I2C clock stretching will remain an issue that needs to be solved by setting register in memory. This will require root access, but is something that could be set at OS startup, and does not need to be solved by pi4j.

@FDelporte FDelporte added the documentation Improvements or additions to documentation label Jun 13, 2021
@FDelporte
Copy link
Member Author

@eitch is this something that can (easily) be documented or described on the site on
https://pi4j.com/documentation/io-examples/i2c/ ?

@eitch
Copy link
Member

eitch commented Jul 14, 2021

@FDelporte Pi4J/pi4j.github.io@18fa2cd this fine?

@FDelporte
Copy link
Member Author

perfect @eitch thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants