Skip to contentSkip to conversation

i2c-bcm2835: Unable to read from i2c0

DISCUSSION Stefan Wahren 3 participants 4 messages Jan 28, 2016 – Jan 29, 2016 3 messages not in the archive I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

Hi,

i'm using a Raspberry Pi B (rev 1) and Linux kernel 4.5rc-1. I have connected a PiGlow (SN3218 at address 0x54) to the P1 Header. The I2C bus clock is set to 100 kHz. Every time i want to read data from i2c0 the following error appear:

[   94.343612] i2c-bcm2835 20205000.i2c: i2c transfer failed: 100

According to the BCM2835 datasheet this should be an ERR ACK (Slave has not acknowledged its address).

Quoted 1 line

i2cdetect -y 0

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

Quoted 1 line

i2cdetect -q -y 0

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- 54 -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

Strangly writing data to the SN3218 works.

Does anyone have an explanation for this error?

Regards
Stefan

#2 lore raw
In reply to a message not in the archive

A few questions:

1) What has changed in your system? Have you ever been able to use the PiGlow?

2) What is the state of the GPIOs?

Phil

Quoted 39 lines · Stefan Wahren

Hi,

i'm using a Raspberry Pi B (rev 1) and Linux kernel 4.5rc-1. I have connected a PiGlow (SN3218 at address 0x54) to the P1 Header. The I2C bus clock is set to 100 kHz.  Every time i want to read data from i2c0 the following error appear:

[   94.343612] i2c-bcm2835 20205000.i2c: i2c transfer failed: 100

According to the BCM2835 datasheet this should be an ERR ACK (Slave has not acknowledged its address).

Quoted 1 line

i2cdetect -y 0

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

Quoted 1 line

i2cdetect -q -y 0

      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f 00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- 54 -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

Strangly writing data to the SN3218 works.

Does anyone have an explanation for this error?

Quoted 7 lines

Regards
Stefan

_______________________________________________
linux-rpi-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

_______________________________________________
linux-rpi-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

#4 lore raw
In reply to a message not in the archive

Hi Phil,

Am 28.01.2016 um 23:49 schrieb Phil:

Quoted 3 lines

A few questions:

1) What has changed in your system? Have you ever been able to use the PiGlow?

please avoid top-posting. I'm using I2C just for a short time, so i don't know if there was a different behavior before. I tested the PiGlow with the following kernel versions:

Raspbian Wheezy 3.18
Raspbian Jessie 4.1.13
Mainline 4.5rc-1

All of them show the same detect behavior (see below).

Writing to the SN3218 works good, i can enable and disable the LEDs ... But i can't read back any values.

I've replaced the PiGlow with a Adafruit Si1145. After that the chip is detected in both cases, but the error messages (i2c transfer failed) still appear.

Quoted 2 lines

2) What is the state of the GPIOs?

What do you mean? configuration of both I2C0 pins?

Do you want a register dump?

Thanks
Stefan

Quoted 50 lines

Phil

Quoted 46 lines · Stefan Wahren

Hi,

i'm using a Raspberry Pi B (rev 1) and Linux kernel 4.5rc-1. I have connected a PiGlow (SN3218 at address 0x54) to the P1 Header. The I2C bus clock is set to 100 kHz. Every time i want to read data from i2c0 the following error appear:

[   94.343612] i2c-bcm2835 20205000.i2c: i2c transfer failed: 100

According to the BCM2835 datasheet this should be an ERR ACK (Slave has not acknowledged its address).

Quoted 1 line

i2cdetect -y 0

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

Quoted 1 line

i2cdetect -q -y 0

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- 54 -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

Strangly writing data to the SN3218 works.

Does anyone have an explanation for this error?

Regards
Stefan

_______________________________________________
linux-rpi-kernel mailing list linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

#6 lore raw
In reply to a message not in the archive
Quoted 5 lines
Quoted 1 line

2) What is the state of the GPIOs?

What do you mean? configuration of both I2C0 pins?

Do you want a register dump?

There are a number of utilities that will display the configuration of all pins - raspi-gpio is the one I use. My intention was to confirm that the I2C0 function was not multiply mapped, but you can do that yourself, and from what you say it probably isn't.

You are likely to get more answers on the Raspberry Pi forums.