ts-7000
[Top] [All Lists]

[ts-7000] Re: I2C interface on TS-7500

To:
Subject: [ts-7000] Re: I2C interface on TS-7500
From: "Alpha" <>
Date: Mon, 04 Apr 2011 02:55:13 -0000
Since my i2c device register and data are in 8 bit, I ended trying using the 
linux <i2c-dev> driver, however it only works if I use the new i2c-dev header 
found at:

gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu/arm-unknown-linux-gnu/sys-include/linux/i2c-dev.h

Since I'm still using the default i2c, do I still assume that I will face the 
clock strecthing issue? the question is, is the clock strecthing issue a driver 
issue (only when you use the cavium api for i2c) or is that a hardware issue? 

--- In  Jonatan Olofsson <> wrote:
>
> It might be worth trying the onboard i2c first, since it works with a subset
> of devices (i.e. those _not_ using clock-stretching), and yours might just
> be one of them. I uploaded the partially working library i used when I was
> working on this, in case it could be of any help
> 
> Best regards,
> Jonatan Olofsson
> 
> On Mon, Mar 7, 2011 at 10:22, limzhiyoong <> wrote:
> 
> > Thanks for the discussion. Hmm I have just got started on the I2C for
> > TS7500/752. So the safest bet is to use bit banging or reconfiguration of
> > the fpga?
> >
> > --- In  Jonatan Olofsson <jonatan.olofsson@>
> > wrote:
> > >
> > > Mostly for future reference,
> > >
> > > After a considerable amount of research and grey hairs, I finally found
> > the
> > > issue with the I2C on the TS-7500: there is none.
> > > Or rather, it's broken, and apparently admittedly so. I got myself a
> > logic
> > > analyzer to analyze the signals, and discovered that the Cavium processor
> > > does in fact send illegal bus commands when the receiver demands clock
> > > stretching (keywords: cavium i2c broken).
> > >
> > > After a month or so of mail conversations, it appears that this is a
> > known
> > > issue at Cavium networks, but that the processor is too old to care
> > about.
> > > So no luck there. TS, being very supportive as opposed to Cavium,
> > suggested
> > > modifying the opencore SPI interface for I2C. While I may not get around
> > to
> > > it myself, I noticed that there actually is some opencore code on this
> > > already at http://opencores.org/project,i2c
> > >
> > > <http://opencores.org/project,i2c>So if you're trying to get I2C working
> > on
> > > the TS-7500 and require that clock-stretching is supported, I
> > unfortunately
> > > must tell you that you cannot use the ordinary processor interface; you
> > have
> > > to either use the FPGA or an external device (which I'm currently leaning
> > > towards, since I still need it in my case) for the I2C communication.
> > >
> > > Best regards,
> > > Jonatan Olofsson
> > >
> > > On Thu, Dec 23, 2010 at 19:24, Jim Jackson <jj@> wrote:
> > >
> > > >
> > > >
> > > >
> > > >
> > > > On Thu, 23 Dec 2010, Jonatan Olofsson wrote:
> > > >
> > > > > It seems very few people has ever used the I2C on the TS-7500, so the
> > > > > documentation is very sparse. I'm determined to write a better one to
> > > > > publish once I've successfully figured it out, but as of now, i would
> > > > need a
> > > > > pointer or two.
> > > > >
> > > > > What I'm trying to accomplish is reading data from a Wii controller
> > to
> > > > the
> > > > > TS. I know the controller works, but all I can seem to get out of it
> > is a
> > > > > series of ones (0xFFFFFFFF), wherever i read from or write to. At
> > first i
> > > > > thought the initialization was wrong, but after triple-checking
> > > > everything,
> > > > > in that case it must be because i misunderstand the way it sends
> > data.
> > > > >
> > > > > From what I gather, the data in the TWI_WR_DAT register is sent LSB
> > > > first.
> > > > > Thus, to send the sequence "start - 0xA6 - 0xFE - 0x05 - stop", I
> > should
> > > > > write 0x53 to the slave address register (=0xA6 in transferred
> > bytes),
> > > > then
> > > > > 0x05FE to the write data register, and lastly enable the bit to start
> > the
> > > > > transmission.
> > > >
> > > > Can't help with the ts7500 and hardware i2c, sorry. But I did get i2c
> > > > running on a ts7260, using the linux 2.4 i2c infrastructure with
> > > > a kernel bit banging module driving a couple of pins on the dio1
> > interface.
> > > >
> > > > A snip from a previous post here I made...
> > > >
> > > > This kernel module works with the standard kernel i2c framework so
> > > > supporting a standard interface to user programs.
> > > >
> > > > I used the stuff from this webpage...
> > > >
> > > >
> > > > http://tisnix.dommel.be/ts-7260/
> > > >
> > > > I then wrote a program to use the kernel interface to the i2c device to
> > > > get data.
> > > >
> > > > All this was done with the standard kernel Linux2.4.26-ts11 supplied by
> > > > Technologics with the ts7260 board. I had to compile all the standard
> > i2c
> > > > modules as well as they are not supplied with the their kernel.
> > > >
> > > >
> > > > > So my first question is, am I getting these basic things right? It
> > would
> > > > be
> > > > > really nice to hear from someone who successfully implemented
> > something
> > > > more
> > > > > than that i2ctemp example, which really isn't very helpful..
> > > > >
> > > > > Best regards and Happy Holidays!
> > > > > Jonatan Olofsson
> > > > >
> > > > > On Thu, Dec 16, 2010 at 21:13, jonatan_olofsson
> > > > > <jonatan.olofsson@ <jonatan.olofsson%40gmail.com>>wrote:
> > > > >
> > > > > >
> > > > > >
> > > > > > I'm still trying to figure out a few things about I2C
> > communication..
> > > > Long
> > > > > > story short, i can't get it to work.
> > > > > >
> > > > > > First off, does anyone know what actually happens when data is
> > > > read/sent
> > > > > > through the registers? What acks/nacks are sent?
> > > > > > From what i gathered from taking my TS-7500 to a logic analyzer
> > today
> > > > in
> > > > > > school, it sends start/stop conditions (and it appears to send
> > data..)
> > > > > >
> > > > > > Part of why i'm asking is, when receiving or sending data, i
> > read/write
> > > > > > from/to 32 byte registers. The device i need to interface sends
> > data a
> > > > 6
> > > > > > byte format, so i would need to be able to read that, and i'm not
> > quite
> > > > sure
> > > > > > what happens if the TS sends stop conditions after just four
> > bytes..
> > > > > >
> > > > > > I really can't find any documentation on this.. I have the cavium
> > > > datasheet
> > > > > > with some register addresses, but still this says nothing of what
> > > > actually
> > > > > > happens on the bus, or how i can actually use the I2C interface..
> > > > > >
> > > > > > I would be tremendously grateful for hints on this, or
> > documentation.
> > > > Or
> > > > > > code, for that matter.
> > > > > >
> > > > > > Best regards,
> > > > > > Jonatan Olofsson
> > > > > >
> > > > > >
> > > > > > --- In  <ts-7000%40yahoogroups.com>
> > <ts-7000%
> > > > 40yahoogroups.com>, "Kris"
> > > >
> > > > > > <kristechnologic@> wrote:
> > > > > > >
> > > > > > > The i2ctemp.c example on our FTP site (
> > > > > >
> > ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/samples/i2ctemp.c)
> > > > will
> > > > > > not work on the TS-7500 as the temp sensor on the TS-752 is SPI. It
> > is
> > > > > > however a generic example of using the I2C hardware in the Cavium
> > CPU.
> > > > We
> > > > > > attempted to use the Linux kernel interface to I2C however it will
> > not
> > > > even
> > > > > > communicate correctly with our I2C temp sensor.
> > > > > > >
> > > > > > > This sample code is going to be the most efficient way of
> > interfacing
> > > > > > with I2C unless you want to bit-bang the data out of DIOs which
> > will be
> > > > much
> > > > > > slower since you have to go through the SBUS to access the DIO
> > pins.
> > > > > > >
> > > > > > > -Kris Bahnsen
> > > > > > > Technologic Systems
> > > > > > >
> > > > > > >
> > > > > > > --- In  <ts-7000%40yahoogroups.com>
> > <ts-7000%
> > > > 40yahoogroups.com>,
> > > >
> > > > > > "jonatan_olofsson" <jonatan.olofsson@> wrote:
> > > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > First of all, thanks for the interesting discussions going on
> > on
> > > > this
> > > > > > forum.
> > > > > > > >
> > > > > > > > I'm trying to get the I2C interface working on my TS-7500.
> > There is
> > > > a
> > > > > > simple example available on the TS ftp, which unfortunately seems a
> > bit
> > > > > > (way) too simple. So my question is, is there anyone who has
> > written
> > > > code
> > > > > > for using the TWI interface, or do i have to write my own
> > > > implementation?
> > > > > > > >
> > > > > > > > Anyone got I2C working already who can give any pointers or
> > hints?
> > > > > > > >
> > > > > > > > Best regards,
> > > > > > > > Jonatan Olofsson
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] Re: I2C interface on TS-7500, Alpha <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU