Uncategorized

rpi4 multiple i2c channels

RE: RPI4 AND I2C; HAS ANYONE USED ADDITIONAL I2C BUSES? Unread postby clicky » 2019-Aug-10 Sat 4:47 am
https://www.raspberrypi.org/forums/viewtopic.php?t=244947#p1516398

First I needed to run rpi-update. Now my /boot/config.txt has:

dtoverlay=i2c1,pins_2_3

dtoverlay=i2c3,pins_4_5

dtoverlay=i2c4,pins_6_7

dtoverlay=i2c6,pins_0_1

But in order for i2c4 to work I needed to switch off SPI – which I need, too.

It is because spi0 uses GPIO-07. So, to fix it I applied

https://www.raspberrypi.org/forums/view … 25#p821666 and moved cs1 to GPIO-23

(along with adding GPIO-24 and GPIO-25) and all works now.

Command i2cdetect -y 1, 3, 4 and 6 return what is attached to that bus at that time.

I am still not sure why I cannot set i2c5 – what is clashing with GPIO-12 or GPIO-13 (GPIO-10 and GPIO-11 are spi0 interface pins).

Fortunately I am after only 4 i2c buses for now.

RE: OPTIONAL INTERFACES (I2C, I2S, SPI) AND DEVICE TREE Postby PhilE » 2015-Sep-28 Mon 10:35 pm
https://www.raspberrypi.org/forums/viewtopic.php?t=98318&start=25#p821666

.END

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s