cossack2013
Posts: 4
Joined: Sat Jun 01, 2013 5:49 pm

i2c pulse stretch

Sat Jun 01, 2013 7:24 pm

Sorry originally posted this in wrong forum.

Does anyone know if they are working on the I2C drivers to enable support for pulse stretching in order to support slower devices ?

I have a number of these device which currently operate from an arduino but not the raspberry pi, and having done some investigation it appears it is due to the Raspberry pi drivers not supporting the pulse stretch functionality.

Cossack2003

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: i2c pulse stretch

Mon Jun 03, 2013 8:01 pm

The term you are looking for in I2C terms is clock stretching.

Unfortunately from memory the Pi only supports clock stretching in ACK phase, which is true for High speed (much greater than 400kHz) modes and Pi only supports upto 400kHz.

From what I understand this is a HARDWARE issue within the I2C controller, so no software can do anything about it.

The alternative is to run I2C at lower clock rate. You do realise the clock rate for I2C is specced as
  • Low Speed = 0 tp 100kHz
  • Fast Speed = 0 tp 400kHz
  • High Speed = 0 tp 3400kHz (yes 3.4MHz)
High speed requires a few things not in Low and fast speed.

So you could run the I2C slower to see if things work
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

kadamski
Posts: 187
Joined: Fri Jun 08, 2012 10:56 pm

Re: i2c pulse stretch

Tue Jun 04, 2013 8:49 am

You can also use software bitbanged GPIO driver. You need kernel recompilation for that currently, though. You can take a look at this thread for some more information.

cossack2013
Posts: 4
Joined: Sat Jun 01, 2013 5:49 pm

Re: i2c pulse stretch

Sat Jun 08, 2013 12:01 pm

Thank you both for your responses, I will give your ideas a go.

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: No registered users and 12 guests