This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TWI/I?C driver for AT91


Andrew Lunn wrote:
Thanks for the heads up. I had noticed there are no DMA channels to
the TWI controller, but didn't think it would be much of an issue.
I'll give it a try and see where it takes me. I need I2C anyway, so
using the eCos framework makes some sense.


If hardware I2c causes you problems you could always do bit banging
using the same pins, but as GPIO lines. There is a bit banging
framework in eCos.

We use the bit banging interface of ecos for I2C. Because an i2c transfer blocks the processor, you can not use i2c too fast, or it could disturb other threads. Be aware that i2c is slow, so a transfer takes a relatively long time, blocking the processor.
For us this is OK, as we only use it for initializations.


Maybe it is a better idea to use for i2c the timer pins of the TC controller with PWM support, and then write your own driver for it. I guess this will have the same performance as using the TWI controller.

Kind regards,
Juergen

Andrew



-- Jürgen Lambrecht Diksmuidse Heerweg 338 8200 Sint-Andries Tel: +32 (0)50 842901 GSM: +32 (0)476 313389

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]