Rick123
Posts: 53
Joined: Fri Jul 21, 2017 6:53 pm

Compute Module I2C not working (I2Cdetect)

Wed Oct 11, 2017 4:02 pm

Hi,
I am using the compute module 3 and I enabled I2C in the raspi-config.
There are I2C devices on both channel 0 and channel 1 but channel 0 seems is not available at all (at least not through I2Cdetect. And channel 1 does not see anything.

As shown in the screenshot below:
- When from the terminal I try I2Cdetect -t 1 (i.e. channel 1) it shows all "--" as shown in the picture below. I assume it means no communication?? or no devices?
- When from the terminal I try I2Cdetect -t 0 (i.e. channel 0) it says "Error: Could not open file '/dev/i2c-0' or '/dev/i2c/0': No such file or directory"

How can I fix it so I can access and use both I2C channels?

Thank you
Attachments
I2Cdetect.jpg
I2Cdetect.jpg (29.1 KiB) Viewed 3351 times

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1815
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Compute Module I2C not working (I2Cdetect)

Wed Oct 11, 2017 4:11 pm

I'm guessing your config.txt just says "dtparam=i2c=on", because if you'd written "dtparam=i2c_arm=on" you might have wondered why it says "i2c_arm" and not "i2c". The reason is that on each platform one of the i2c interfaces is nominally owned by the VideoCore VPU (usually i2c0), while the other (usually i2c1) is left for the ARM. Unless you know what you're doing it is best to avoid the other bus (enabled with "dtparam=i2c_vc=on").

Rick123
Posts: 53
Joined: Fri Jul 21, 2017 6:53 pm

Re: Compute Module I2C not working (I2Cdetect)

Wed Oct 11, 2017 5:10 pm

Thanks Phil,
I checked and no, the config.txt says dtparam=i2c_arm=on

after reading your message I tried changing it to dtparam=i2c_arm=on but exactly the same output as per previous screenshot appears.

We need to use both I2C but at the moment neither of them owrk.

1. Could you please help first with the one which seems to be recognised (i.e. I2C 1). Why do we see all "--"?

2. Is the I2C channel 1 the default available?

3. How do we enable safely the second I2C (i.e. channel 0)? Just adding "dtparam=i2c_vc=on" or are there other things we should be aware of and take care of? I am asking because from your reply it sounded like it might not be as straight forward as just typing that in...

Many thanks
Rick

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1815
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Compute Module I2C not working (I2Cdetect)

Thu Oct 12, 2017 1:23 pm

1. Your hardware is probably wrong - do you have a pull-up on the bus?

2.
. Is the I2C channel 1 the default available?
Pardon? On everything but very early Pis, I2C1 is i2c_arm is i2c, while i2c0 is i2c_vc. Your answer may or may not be in that sentence, depending on what the question meant.

3. "dtparam=i2c_vc=on" is the correct way to enable the other channel. Most (i.e. low bandwidth) uses are now handled by the firmware using a software I2C driver, so provided you aren't using a camera it ought to be safe.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5538
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Compute Module I2C not working (I2Cdetect)

Thu Oct 12, 2017 2:42 pm

Minor clarifications (I don't mean to nit-pick!)
PhilE wrote:
Thu Oct 12, 2017 1:23 pm
1. Your hardware is probably wrong - do you have a pull-up on the bus?
Lack of pull ups would result in all addresses responding as "low" would be counted as an ACK and hence device present.

Check the pin muxing using "raspi-gpio get".
If the I2C busses are enabled then by default i2c-0 will result in GPIO 00 showing SDA0, and GPIO 01 showing SCL0, whilst i2c-1 should show GPIO 02 as SDA1 and GPIO03 as SCL1. Check that no other GPIOs show those functions as that will cause issues.
PhilE wrote:2.
. Is the I2C channel 1 the default available?
Pardon? On everything but very early Pis, I2C1 is i2c_arm is i2c, while i2c0 is i2c_vc. Your answer may or may not be in that sentence, depending on what the question meant.

3. "dtparam=i2c_vc=on" is the correct way to enable the other channel. Most (i.e. low bandwidth) uses are now handled by the firmware using a software I2C driver, so provided you aren't using a camera it ought to be safe.
Or 7" display. The touchscreen is polled over the I2C, but can be disabled with "disable_touchscreen=1" in config.txt.
The only other user is HAT EEPROMs, and that is disabled by default on CMs.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1815
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Compute Module I2C not working (I2Cdetect)

Thu Oct 12, 2017 2:46 pm

The only other user is HAT EEPROMs, and that is disabled by default on CMs.
HAT EEPROMs are read once, long before the kernel starts, so that shouldn't be a problem on any platform.

McLion
Posts: 76
Joined: Fri Mar 17, 2017 1:05 pm
Location: Switzerland

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 4:41 pm

Did this get solved?
I am having a similar issue. I try to use GPIO44/45 on a CM3 module as I2C.
In config.txt I have

Code: Select all

dtparam=i2c_arm=on
Raspi-gpio get shows:

Code: Select all

GPIO 44: level=1 fsel=0 alt=  func=INPUT
GPIO 45: level=1 fsel=0 alt=  func=INPUT
Even after I set these manually to ALT2

Code: Select all

GPIO 44: level=1 fsel=6 alt=2 func=SDA1
GPIO 45: level=1 fsel=6 alt=2 func=SCL1
i2cdetect -y 1 returns:

Code: Select all

Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory
There are no i2c devices in /dev which probably is the problem.
What could be the reason these devices are not there and available.

Thanks for any hints.
Franz

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1815
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 4:56 pm

The I2C role assignments on a Compute Module are more tricky. The rule is that the i2c_vc role is assigned to the CAMERA_0_I2C_PORT I2C bus, but only if NUM_CAMERAS is 1, which isn't true on a Compute Module with a default dt-blob.

On a Compute Module it is safer to use the absolute I2C bus/driver instance numbers:

Code: Select all

dtparam=i2c1=on
If that doesn't solve your problem, post the full output of "raspi-gpio get" and "ls /dev/i2c*".

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1815
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 5:03 pm

Alternatively use the i2c1-bcm2708 overlay:

Code: Select all

dtoverlay=i2c1-bcm2708,sda1_pin=44,scl1_pin=45,pin_func=6
This will enable i2c1 AND set the pin functions correctly.

Code: Select all

[email protected]:~$ dtoverlay -h i2c1-bcm2708
Name:   i2c1-bcm2708

Info:   Enable the i2c_bcm2708 driver for the i2c1 bus

Usage:  dtoverlay=i2c1-bcm2708,<param>=<val>

Params: sda1_pin                GPIO pin for SDA1 (2 or 44 - default 2)
        scl1_pin                GPIO pin for SCL1 (3 or 45 - default 3)
        pin_func                Alternative pin function (4 (alt0), 6 (alt2) -
                                default 4)



McLion
Posts: 76
Joined: Fri Mar 17, 2017 1:05 pm
Location: Switzerland

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 5:06 pm

Did not help - still no i2c dev

Code: Select all

[email protected]:~ $ raspi-gpio get
BANK0 (GPIO 0 to 27):
  GPIO 00: level=1 fsel=6 alt=2 func=PCLK
  GPIO 01: level=0 fsel=6 alt=2 func=DE
  GPIO 02: level=0 fsel=6 alt=2 func=LCD_VSYNC
  GPIO 03: level=0 fsel=6 alt=2 func=LCD_HSYNC
  GPIO 04: level=0 fsel=6 alt=2 func=DPI_D0
  GPIO 05: level=0 fsel=6 alt=2 func=DPI_D1
  GPIO 06: level=0 fsel=6 alt=2 func=DPI_D2
  GPIO 07: level=0 fsel=6 alt=2 func=DPI_D3
  GPIO 08: level=0 fsel=6 alt=2 func=DPI_D4
  GPIO 09: level=0 fsel=6 alt=2 func=DPI_D5
  GPIO 10: level=0 fsel=6 alt=2 func=DPI_D6
  GPIO 11: level=0 fsel=6 alt=2 func=DPI_D7
  GPIO 12: level=0 fsel=6 alt=2 func=DPI_D8
  GPIO 13: level=0 fsel=6 alt=2 func=DPI_D9
  GPIO 14: level=0 fsel=6 alt=2 func=DPI_D10
  GPIO 15: level=0 fsel=6 alt=2 func=DPI_D11
  GPIO 16: level=0 fsel=6 alt=2 func=DPI_D12
  GPIO 17: level=0 fsel=6 alt=2 func=DPI_D13
  GPIO 18: level=0 fsel=6 alt=2 func=DPI_D14
  GPIO 19: level=0 fsel=6 alt=2 func=DPI_D15
  GPIO 20: level=0 fsel=6 alt=2 func=DPI_D16
  GPIO 21: level=0 fsel=6 alt=2 func=DPI_D17
  GPIO 22: level=0 fsel=6 alt=2 func=DPI_D18
  GPIO 23: level=0 fsel=6 alt=2 func=DPI_D19
  GPIO 24: level=0 fsel=6 alt=2 func=DPI_D20
  GPIO 25: level=0 fsel=6 alt=2 func=DPI_D21
  GPIO 26: level=0 fsel=6 alt=2 func=DPI_D22
  GPIO 27: level=0 fsel=6 alt=2 func=DPI_D23
BANK1 (GPIO 28 to 45):
  GPIO 28: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 29: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 30: level=1 fsel=0 alt=  func=INPUT
  GPIO 31: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 32: level=1 fsel=2 alt=5 func=TXD1
  GPIO 33: level=1 fsel=2 alt=5 func=RXD1
  GPIO 34: level=1 fsel=1 alt=  func=OUTPUT
  GPIO 35: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 36: level=1 fsel=6 alt=2 func=TXD0
  GPIO 37: level=1 fsel=6 alt=2 func=RXD0
  GPIO 38: level=0 fsel=0 alt=  func=INPUT
  GPIO 39: level=0 fsel=0 alt=  func=INPUT
  GPIO 40: level=0 fsel=4 alt=0 func=PWM0
  GPIO 41: level=0 fsel=4 alt=0 func=PWM1
  GPIO 42: level=0 fsel=1 alt=  func=OUTPUT
  GPIO 43: level=1 fsel=0 alt=  func=INPUT
  GPIO 44: level=1 fsel=0 alt=  func=INPUT
  GPIO 45: level=1 fsel=0 alt=  func=INPUT
BANK2 (GPIO 46 to 53):
  GPIO 46: level=1 fsel=0 alt=  func=INPUT
  GPIO 47: level=1 fsel=0 alt=  func=INPUT
  GPIO 48: level=0 fsel=4 alt=0 func=SD0_CLK
  GPIO 49: level=1 fsel=4 alt=0 func=SD0_CMD
  GPIO 50: level=1 fsel=4 alt=0 func=SD0_DAT0
  GPIO 51: level=1 fsel=4 alt=0 func=SD0_DAT1
  GPIO 52: level=1 fsel=4 alt=0 func=SD0_DAT2
  GPIO 53: level=1 fsel=4 alt=0 func=SD0_DAT3

Code: Select all

[email protected]:~ $ ls -l /dev/i*
lrwxrwxrwx 1 root root  25 Jan  1  1970 /dev/initctl -> /run/systemd/initctl/fifo

/dev/input:
insgesamt 0
drwxr-xr-x 2 root root     120 Dez  8 18:01 by-id
drwxr-xr-x 2 root root     120 Dez  8 18:01 by-path
crw-rw---- 1 root input 13, 64 Dez  8 18:01 event0
crw-rw---- 1 root input 13, 65 Dez  8 18:01 event1
crw-rw---- 1 root input 13, 66 Dez  8 18:01 event2
crw-rw---- 1 root input 13, 63 Dez  8 18:01 mice
crw-rw---- 1 root input 13, 32 Dez  8 18:01 mouse0

McLion
Posts: 76
Joined: Fri Mar 17, 2017 1:05 pm
Location: Switzerland

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 5:07 pm

Going to try the overlay ...

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1815
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 5:12 pm

If that doesn't work, can I see the output from "sudo vcdbg log msg"? If you are sending the output to a file you'll need to send stderr as well:

Code: Select all

$ sudo vcdbg log msg 2>&1 | grep -vi hdmi > vclog.txt

McLion
Posts: 76
Joined: Fri Mar 17, 2017 1:05 pm
Location: Switzerland

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 5:16 pm

The overlay did the trick :D
i2cdetect -l lists now:

Code: Select all

i2c-1   i2c             bcm2835 I2C adapter                     I2C adapter
btw. what are these entries ... I did suspect and tried the first (1)

and i2cdetect -y 1 returns:

Code: Select all

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- 52 -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
... and there is my EEPROM :)

Thanks a million !

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1815
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 5:19 pm

btw. what are these entries ... I did suspect and tried the first (1)
i2c-1 is the name of the I2C driver instance for I2C bus 1, or have I misunderstood your question?

McLion
Posts: 76
Joined: Fri Mar 17, 2017 1:05 pm
Location: Switzerland

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 5:20 pm

anyhow, FWIW ... here's the vclog.txt

Code: Select all

001078.029: brfs: File read: /mfs/sd/config.txt
001079.347: brfs: File read: 2169 bytes
001090.056: brfs: File read: /mfs/sd/edid.dat
001102.463: brfs: File read: 256 bytes
001106.904: brfs: File read: /mfs/sd/config.txt
001108.288: gpioman: gpioman_get_pin_num: pin DISPLAY_SDA not defined
001116.516: gpioman: gpioman_get_pin_num: pin BT_ON not defined
001116.535: gpioman: gpioman_get_pin_num: pin WL_ON not defined
001243.306: *** Restart logging
001243.332: brfs: File read: 2169 bytes
001246.110: brfs: File read: /mfs/sd/cmdline.txt
001246.187: Read command line from file 'cmdline.txt'
dwc_otg.lpm_enable=0 console=ttyS0,115200N8 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait splash plymouth.ignore-serial-consoles
001246.451: brfs: File read: 176 bytes
001612.042: brfs: File read: /mfs/sd/kernel7.img
001612.067: Loading 'kernel7.img' to 0x8000 size 0x45dbc8
001612.114: No kernel trailer - assuming DT-capable
001612.142: brfs: File read: 4578248 bytes
001618.121: brfs: File read: /mfs/sd/bcm2710-rpi-cm3.dtb
001618.145: Loading 'bcm2710-rpi-cm3.dtb' to 0x465bc8 size 0x3ffc
001716.677: brfs: File read: 16380 bytes
001721.394: brfs: File read: /mfs/sd/config.txt
001722.015: dtparam: audio=on
001732.885: brfs: File read: 2169 bytes
001741.286: brfs: File read: /mfs/sd/overlays/dpi24.dtbo
001750.405: Loaded overlay 'dpi24'
001772.245: brfs: File read: 789 bytes
001784.620: brfs: File read: /mfs/sd/overlays/pwm-2chan.dtbo
001792.788: Loaded overlay 'pwm-2chan'
001792.804: dtparam: pin=40
001793.106: dtparam: func=4
001793.421: dtparam: pin2=41
001793.726: dtparam: func2=4
001813.523: brfs: File read: 1057 bytes
001839.640: brfs: File read: /mfs/sd/overlays/nf-uart0.dtbo
001847.061: Loaded overlay 'nf-uart0'
001870.581: brfs: File read: 1006 bytes
001899.415: brfs: File read: /mfs/sd/overlays/nf-uart1.dtbo
001907.538: Loaded overlay 'nf-uart1'
001932.139: brfs: File read: 1002 bytes
001942.086: brfs: File read: /mfs/sd/overlays/i2c1-bcm2708.dtbo
001950.338: Loaded overlay 'i2c1-bcm2708'
001950.356: dtparam: sda1_pin=44
001950.763: dtparam: scl1_pin=45
001951.171: dtparam: pin_func=6
002966.195: Device tree loaded to 0x2efeb900 (size 0x46e3)
002967.774: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
004398.850: vchiq_core: vchiq_init_state: slot_zero = 0xee580000, is_master = 1
004408.857: TV service:host side not connected, dropping notification 0x00000002, 0x00000002, 0x00000057

McLion
Posts: 76
Joined: Fri Mar 17, 2017 1:05 pm
Location: Switzerland

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 5:23 pm

PhilE wrote:
Fri Dec 08, 2017 5:19 pm
btw. what are these entries ... I did suspect and tried the first (1)
i2c-1 is the name of the I2C driver instance for I2C bus 1, or have I misunderstood your question?
It looked like multiple entries, i.e. multiple buses, maybe correctly formatted like this (eventually name and description):
i2c-1 i2c
bcm2835 I2C adapter I2C adapter

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1815
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 5:31 pm

The output is one line per bus:

Code: Select all

static void print_i2c_busses(void)
{
	struct i2c_adap *adapters;
	int count;

	adapters = gather_i2c_busses();
	if (adapters == NULL) {
		fprintf(stderr, "Error: Out of memory!\n");
		return;
	}

	for (count = 0; adapters[count].name; count++) {
		printf("i2c-%d\t%-10s\t%-32s\t%s\n",
			adapters[count].nr, adapters[count].funcs,
			adapters[count].name, adapters[count].algo);
	}

	free_adapters(adapters);
}
So the fields are the bus number, the "funcs"/functions, the name and the "algo"/algorithm.

Nothing to see here, move along.

McLion
Posts: 76
Joined: Fri Mar 17, 2017 1:05 pm
Location: Switzerland

Re: Compute Module I2C not working (I2Cdetect)

Fri Dec 08, 2017 5:35 pm

Thanks a lot for the clarification :)
.. and for this surprisingly and remarkably swift help ! :D

You just saved my weekend ;)

tempidoro
Posts: 7
Joined: Mon Apr 24, 2017 2:51 pm

Re: Compute Module I2C not working (I2Cdetect)

Sat Dec 09, 2017 11:21 pm

Hi all,
I have a subtle I/O Err5 when using I2c to connect Rpi zero w as a master to PIC18F45k42 as a slave.

At the beginning I can see the Pic on the I2c bus by using the command I2cdetect -y 1.
I send two bytes with two instructions :

n.1 bus.write_byte(device_address,data1)
time.sleep(1)
n.2 bus.write_byte(device_address,data2)

The Rpi code end with error and the Traceback error ends with OSError:[Errno 5] Input/output error found in the line n.1.

However, the PIC correctly receive data1 and, as I can control by reading the appropriate registers on the PIC, it also receive the STOP bit from Rpi.

Accordingly, I do not understand why there is an Rpi error and why it involves line n.1.

After the error occurred, I cannot find the PIC when I use the command I2cdetect -y 1.

However, if I reprogram the PIC (I use PicKit3), I can find again the PIC on the I2C bus.

Somebody can help?
Thanks

jeba
Posts: 2
Joined: Fri Jul 27, 2018 6:43 pm

Re: Compute Module I2C not working (I2Cdetect)

Fri Jul 27, 2018 7:05 pm

i have same issue, but nothing from this thread helps.
I've tried to connect 2x16 screen using i2c (following this: https://tutorials-raspberrypi.com/contr ... y-via-i2c/).
I have raspberry pi 3B+ with fresh raspbian (reinstalled to clear my previous attempts to make i2c work).
i2cdetect shows:

Code: Select all

[email protected]:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
After reinstallation I've done this:

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
sudo apt-get install python-smbus i2c-tools
/etc/modprobe.d/raspi-blacklist.conf was empty, but I've tried to edit this, now it shows this:

Code: Select all

#blacklist spi-bcm2708
#blacklist i2c-bcm2708
in /boot/config.txt I've modified or left untouched this:

Code: Select all

dtparam=i2c1=on
dtparam=i2c_arm=on
dtoverlay=i2c1-bcm2708,sda1_pin=2,scl_pin=3
raspi-gpio get shows this:

Code: Select all

GPIO 2: level=1 fsel=4 alt=0 func=SDA1
GPIO 3: level=1 fsel=4 alt=0 func=SCL1
i2cdetect -l shows this:

Code: Select all

i2c-1   i2c             bcm2835 I2C adapter                     I2C adapter
Light on my screen is enabled, but that's all.
I'm a bit new with raspberry and now a bit confused, because I've spent last 2 days looking for what am i doing wrong and can't find the answer.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1815
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Compute Module I2C not working (I2Cdetect)

Sat Jul 28, 2018 11:17 am

From memory, the Compute Modules don't have built in pull-ups on the I2C lines. Try adding external pull-up resistors, as required by I2C, and see if that makes a difference.

jeba
Posts: 2
Joined: Fri Jul 27, 2018 6:43 pm

Re: Compute Module I2C not working (I2Cdetect)

Sat Jul 28, 2018 11:55 am

I was sure i was doing something wrong and i finally found it! I used level shifter but it was not soldered.. I hoped PCB will have contact with pins but looks like it hadn't. Now I've solderd it (first time, looks great for me :)) and I'm one step further :D

Code: Select all

[email protected]:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3f
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
[email protected]:~ $

Image

Return to “Compute Module”

Who is online

Users browsing this forum: No registered users and 7 guests