Ever played your countries lottery? Looks like your 'the lucky guy' so give it a chance!
Why do I say that? Simply because of
in config.txt I took the 'lucky guys approach' to see what I2C-bus number lottery will give mereboot and check what I've got. Make a bet ... not what you see when doing the same!As you can see I've ended up with my SW I2C on Bus-no 22.
That your particular Pi is ending with SW IC2-11 enabled is purely random!
changing the config and adding a fixed number to the SW-I2C overlaywill result inAs expected, SW I2C-5 is enabled and the device is there.
Note: your results may look different as I don't know which Pi you have (I'm on CM4).
Why do I say that? Simply because of
I took a CM4 based device and connected it to my 'standard' I2C testbed - a small board with a TLC59116 LED driver and 4 pcs of RGB LEDs.Name: i2c-gpio
Info: Adds support for software i2c controller on gpio pins
Load: dtoverlay=i2c-gpio,<param>=<val>
Params: i2c_gpio_sda GPIO used for I2C data (default "23")
i2c_gpio_scl GPIO used for I2C clock (default "24")
i2c_gpio_delay_us Clock delay in microseconds
(default "2" = ~100kHz)
bus Set to a unique, non-zero value if wanting
multiple i2c-gpio busses. If set, will be used
as the preferred bus number (/dev/i2c-<n>). If
not set, the default value is 0, but the bus
number will be dynamically assigned - probably
3.
in config.txt I took the 'lucky guys approach' to see what I2C-bus number lottery will give me
Code:
dtoverlay=i2c-gpio,i2c_gpio_sda=10,i2c_gpio_scl=11
Code:
pi@cm4:~ $ sudo i2cdetect -li2c-20i2c fef04500.i2c I2C adapteri2c-21i2c fef09500.i2c I2C adapteri2c-22i2c ffffffff00000002.i2c I2C adapterpi@cm4:~ $ sudo i2cdetect -y 22 0 1 2 3 4 5 6 7 8 9 a b c d e f00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: 60 -- -- -- -- -- -- -- 68 -- -- 6b -- -- -- -- 70: -- -- -- -- -- -- -- -- pi@cm4:~ $
That your particular Pi is ending with SW IC2-11 enabled is purely random!
changing the config and adding a fixed number to the SW-I2C overlay
Code:
dtoverlay=i2c-gpio,bus=5,i2c_gpio_sda=10,i2c_gpio_scl=11
Code:
pi@cm4:~ $ sudo i2cdetect -li2c-5i2c 500000002.i2c I2C adapteri2c-20i2c fef04500.i2c I2C adapteri2c-21i2c fef09500.i2c I2C adapterpi@cm4:~ $ sudo i2cdetect -y 5 0 1 2 3 4 5 6 7 8 9 a b c d e f00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: 60 -- -- -- -- -- -- -- 68 -- -- 6b -- -- -- -- 70: -- -- -- -- -- -- -- -- pi@cm4:~ $
Note: your results may look different as I don't know which Pi you have (I'm on CM4).
Statistics: Posted by aBUGSworstnightmare — Fri Jan 19, 2024 8:24 am