Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
2835 I2C interface.pdf

2835 I2C interface.pdf

Ratings: (0)|Views: 2,258|Likes:
Published by gvanloo8080
Explains what the problem is with the BCM2835 (Raspberry-Pi) I2C interface
Explains what the problem is with the BCM2835 (Raspberry-Pi) I2C interface

More info:

Published by: gvanloo8080 on Mar 23, 2013
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





BCM2835 I2C interface bug
G.J. van Loo, 22 March 2013There is a known bug in the 2835 I2C interface: The BCM2835 does not respond correctly if the I2C slavestretches the I2C clock.
Looking at the signals
When looking at an I2C signal (SDA or SCL) on a scope you have the problem that you cannot see who iscontrolling the line. If the signal is low either (or both) side can be pulling it low. To help with that I usedthe following measuring circuit:
1K8120Scopeprobe A-sideB-side A-side pulls lowB-sidepulls lowMeasure I2C signals
 The 1K8 resistor is on the raspberry-Pi board but I added a 120 ohm series resistor in each link. Thiscauses a 200mV voltage drop. Now you can see which side is controlling the signal. It does not show you
when both side are pulling the line low but you normally don’t care about that situation.
Write or Transmit 
: The Raspi sends data to the I2C slave.
Read or Receive
: The Raspi receives data from the I2C slave. The Raspi still sends out the clockand the address byte. After that it switches to receive data but it onlycontrols the clock. The data line is controlled by the I2C SLAVE.
During the acknowledge phase the ‘other’ party takes control of the data line.
Checking the oscilloscope screen revealed why: suddenly there are I2C clock pulses which have a totallywrong duty cycle:
What is happening inside the 2835? The I2C interface is running of a programmed clock. When an I2Ctransfer is active this clock is always running and it
has the same frequency/period. Thus for the2835 all clock edges are equidistant.

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->