7 ms·
To avoid clock-stretching problems, using one of the small Arduinos that support USB serial to handle the I2C bus can help considerably, at the expense of a bit
by dws 7y ago
To avoid clock-stretching problems, using one of the small Arduinos that support USB serial to handle the I2C bus can help considerably, at the expense of a bit more programming complexity.
- zeta0134 7y agoI'm not at all familiar with this space, but I'm a bit surprised the kernel isn't wrapping the I2C transmission and helping to work around clock stretching issues anyway. Can someone who's more familiar with this implementation weigh in? It seems like that'd be the primary feature of writing to the /dev/i2c* device instead of manually bit-banging the GPIO pins from userland.
- opencl 7y agoThe Pi's hardware i2c has buggy silicon and does not handle clock stretching properly. There's also a kernel driver to bitbang i2c over the GPIO pins and clock stretching does work properly with that.
- BubRoss 7y agoDoes the PI 4 also have this problem?
- opencl 7y agoI'm not sure about the 4, though it was present at least from the original up through the 3B+.
- davidf560 7y agoThere's a claim that it was fixed here: https://www.raspberrypi.org/forums/viewtopic.php?p=1484482#p1484482 https://www.raspberrypi.org/forums/viewtopic.php?p=1484482#p... Apparent confirmation here (by mapping a different I2C bus?): https://www.raspberrypi.org/forums/viewtopic.php?p=1544123&sid=9893879e086f80a2c71987dc6a564089#p1544123 https://www.raspberrypi.org/forums/viewtopic.php?p=1544123&s...