public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] TWI/I?C driver for AT91
       [not found] <e37cb5250711220842k3204f4c2sbb50afd41698acb3@mail.gmail.com>
@ 2007-11-22 18:28 ` Andrew Lunn
  2007-11-27 16:44   ` Jonathan Larmour
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Lunn @ 2007-11-22 18:28 UTC (permalink / raw)
  To: Tom Deconinck; +Cc: eCos Devel

On Thu, Nov 22, 2007 at 05:42:11PM +0100, Tom Deconinck wrote:
> Hello,
> 
> Does anyone know if there exists a driver for the AT91 TWI peripheral?
> It's Atmels implementation of I?C and it's used on the AT91SAM7S
> family (and derivatives).
> I would create a driver that fits in the eCos I?C driver (master
> only), but I wanted to check to make sure nothing alike already
> exists.

I've been involved in a none eCos project which used an AT91SAM7S and
the TWI port. This turned out to be more difficult than expected. If
you don't feed it data fast enough it stops the transfer mid message
with an abort of something. Also, there is no DMA for this device. So
you need to make sure your other interrupt handlers are fast or you
run into problems. 

    Andrew       

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] TWI/I?C driver for AT91
  2007-11-22 18:28 ` [ECOS] TWI/I?C driver for AT91 Andrew Lunn
@ 2007-11-27 16:44   ` Jonathan Larmour
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2007-11-27 16:44 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Tom Deconinck, eCos Devel

Andrew Lunn wrote:
> On Thu, Nov 22, 2007 at 05:42:11PM +0100, Tom Deconinck wrote:
>> Hello,
>>
>> Does anyone know if there exists a driver for the AT91 TWI peripheral?
>> It's Atmels implementation of I?C and it's used on the AT91SAM7S
>> family (and derivatives).
>> I would create a driver that fits in the eCos I?C driver (master
>> only), but I wanted to check to make sure nothing alike already
>> exists.
> 
> I've been involved in a none eCos project which used an AT91SAM7S and
> the TWI port. This turned out to be more difficult than expected. If
> you don't feed it data fast enough it stops the transfer mid message
> with an abort of something. Also, there is no DMA for this device. So
> you need to make sure your other interrupt handlers are fast or you
> run into problems. 

Hmm, I've done an AT91 TWI implementation for eCosPro, and didn't have
abort problems. But then there are caveats on its use as it isn't a
brilliant fit with the I2C API - in particular there's no way to send NACKs
without a STOP, and (I might be misremembering here - it's been a while) I
think possibly no way to do a STOP not in conjunction with a transfer.

Jifl
-- 
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-27 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <e37cb5250711220842k3204f4c2sbb50afd41698acb3@mail.gmail.com>
2007-11-22 18:28 ` [ECOS] TWI/I?C driver for AT91 Andrew Lunn
2007-11-27 16:44   ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).