2

I am using both the i2c-0 and i2c-1 busses on my raspberry pi compute module 3.

I can use i2c-1 no problem. Full comms, can probe the line and see good signals, get good signals back and the good old i2cdetect -y 1 command gives the expected response for the addresses used.

I then set up i2c-0. The raspi-config is already enabled (from the i2c-1 bus) and the /etc/modules file already has the line i2c-dev. I then create the required file at /dev/i2c-0. But then when I attempt i2cdetec -y 1 gives the error:

Error: Could not get the adaptor functionality matrix: Inappropriate ioct1 for device

Have I forgotten some important step in setting up the i2c bus? Or have I missed something important in the datasheet which stops me using i2c-0 bus?

EDIT: This is on a Raspberry Pi compute module 3 (standard, not the lite version) and we're running Raspbian Stretch.

Puffafish
  • 181
  • 1
  • 6

1 Answers1

6

After searching around I have found the problem.

Simple solution is that the config menu only enabled i2c-1 bus, not the i2c busses in general.

Opening the file /boot/config.txt and then adding the line dtparam=i2c_vc=on, performing a reboot, starts up the i2c-0 bus! And all is good.

(Adding that line created the /dev/i2c-0 file, so I didn't need to create it)

Puffafish
  • 181
  • 1
  • 6