Closed PaintYourDragon closed 2 years ago
Good point. It appears to be unused and there's a commented out error message that says it's not settable, so it should probably just be removed. See: https://github.com/adafruit/Adafruit_Blinka/blob/main/src/adafruit_blinka/microcontroller/generic_linux/i2c.py#L18-L31
Ah! OK. Fortunately I was able to eke out about an extra 30% by changing /boot/config.txt with:
dtoverlay=i2c-gpio,bus=2,i2c_gpio_sda=22,i2c_gpio_scl=23,i2c_gpio_delay_us=1
dtoverlay=i2c-gpio,bus=3,i2c_gpio_sda=17,i2c_gpio_scl=27,i2c_gpio_delay_us=1
and that might be just enough for this project. There are different settings in that file for adjusting the “real” I2C interface, and possibly the second (normally used for HAT firmware stuff, if it’s safe to use). Will keep those in my back pocket for now, since it seems like above change + some library changes will do what I need.
Thx for checking!
Regardless of “frequency” setting, actual I2C frequency is always about 155 KHz. i.e.. these all yield the same throughput:
Test system is Raspberry Pi 3 B+, configured with two extra I2C buses in /boot/config.txt:
Happens on both buses. Not sure if this belongs here or is an underlying busio issue. Extra peculiar that it’s a somewhat non-standard-ish 155 KHz, not defaulting to an Arduino-like 100 KHz.