ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5959
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: I2C stretch bug. Been fixed or not?

Tue Aug 14, 2018 4:28 pm

It's a hardware bug, so it's not going away. You could use i2c-gpio as a workaround.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5959
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: I2C stretch bug. Been fixed or not?

Tue Aug 14, 2018 4:46 pm


ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5959
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: I2C stretch bug. Been fixed or not?

Tue Aug 14, 2018 7:12 pm

If you provide a little more information about your setup maybe I could help more. What software are you talking about? What does your config.txt look like? What does 'ls /dev/i2c-*' say?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5959
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: I2C stretch bug. Been fixed or not?

Tue Aug 14, 2018 8:31 pm

Insurmountable wrote:
Tue Aug 14, 2018 8:23 pm
added the following to my config.txt.

dtoverlay=i2c-gpio,i2c_gpio_sda=<18>,i2c_gpio_scl=<17>

rebooted

i2cdetect -y 3

It detects nothing, but my logic analyser shows both pins at 0v.

I then check both pins by switching them using GPIO.output, they work OK.
Remove the <> brackets. Please also answer the other questions in the previous post.

Rodjenas
Posts: 1
Joined: Fri Aug 16, 2019 10:21 am

Re: I2C stretch bug. Been fixed or not?

Fri Aug 16, 2019 10:33 am

Is the bug still present on RPI4B?

I am currently using a RPI3B at work to run tests on a radiomodule we are producing hera at SAAB.
I get a lot of errors because of this bug and I'm considering buying a RPI clone or RPI4B if the bug is fixed.

SW I2C is not an option, to slow.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12217
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: I2C stretch bug. Been fixed or not?

Fri Aug 16, 2019 8:22 pm

Yes, it should be fixed.

From previous beta testers archive.

PhilE should know more details.
eupton wrote:
Wed Mar 20, 2019 9:13 pm
jamesh wrote:
Wed Mar 20, 2019 6:16 pm
PiBakery wrote:
Wed Mar 20, 2019 5:43 pm
What extra (if any?) GPIO interfaces will the Pi 4 have? All of the extra SPI, UART, etc. that was in development last year, or have there been more updates?
I believe there are more UARTS, and a second SPI port. I *think* there is another I2C which does not have the clock stretching bug, but will need to talk to Phil for more details.
In addition to the legacy peripherals we have:
  • 4 new PL011 UARTs with decent sized FIFOs
  • 4 new I2C controllers with fixed (or differently broken) clock stretching
  • 4 copies of the old SPI controller
All neatly laid out as bank0 auxiliaries so you can trade 1 UART for 1 SPI (4 pins each) or 2 I2Cs (2 pins each).

Also, we added dedicated PWM peripherals for audio, so you can use both at the same time.

Return to “Troubleshooting”