This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
Re: i2c driver for at91sam7x
- From: "Tom Deconinck" <t dot deconinck at gmail dot com>
- To: ecos-devel at ecos dot sourceware dot org
- Date: Mon, 10 Nov 2008 11:34:00 +0100
- Subject: Re: i2c driver for at91sam7x
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=EIcVjk+Y186CzeVfndgEj+lOFSygpTt8k1fYyfqAbf8=; b=bGkUo35zHcuvPnJVXoXQWP/K30ucymc3Jlqyf+ka5o3xhgEo1YOp1QGGFGpCEGZ/8H bsX13no2dYF7dRwjeVeajMON9Ktfk33HyQ3YLeimVKAzFqo8o2lNBi8kEnuGlNGRIt1z ThPs8I+SX8p3Xt3WEKK+ssJGx9lNXBzpljo6s=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=GWj3z/0uprOpUZFQQtjgT0QA8nNWUj3W4jx3jsTYQKzgfQcf1mzXMXnFymAUTWAmKE 31UcMituXFwr13qJu7ah7BEuImmmnLiCMHmB4Qydk6JkLCExbqW99uwojeV+hVWSYwwC J3TSRwUoScLIEFdOfTdHUQ+TQRPjaX07g9r6M=
- References: <1226070563.4223.2.camel@localhost.localdomain> <20081107161442.GS20110@lunn.ch> <e37cb5250811100228r502511f7qd34d94f5d83862ee@mail.gmail.com>
On Fri, Nov 7, 2008 at 5:14 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Fri, Nov 07, 2008 at 08:39:23PM +0530, vibisreenivasan wrote:
> > hello,
> > Is there any one working on i2c bus driver for at91sam7x.
>
> I know eCosCentric have one, but you need to pay for that.
>
> Other people have mentioned writing i2c drivers as well.
>
> However, you need to be careful. The i2c hardware is broken. The Linux
> kernel marks it as such. See:
>
> http://www.at91.com/samphpbb/viewtopic.php?t=4665&sid=1032a7cdc95b571dc784adb204d78d33
>
> From what i understand, if you are doing transfers of 1 byte, it is
> O.K, but multiple byte transfers can break.
>
> Writing a GPIO based driver should be reasonably easy as far as i
> understand and does not suffer from these problems.
>
> Andrew
I have written such a driver some time ago, but I changed jobs since,
so I don't have access to the source anymore.
My experience: use GPIO and the eCos bit-banging interface, since the
hardware implementation is seriously broken.
The driver I wrote didn't work well using interrupts (latency problems
combined with a 'smart' hardware implementation that decides to
generate stop-conditions by itself, breaking multy-byte transfers,
etc.) It did work in polling mode.
Tom