[ECOS] i2c: polled or interrupts?
Mon Jul 9 22:43:00 GMT 2007
what would be the most sensible way to manage an i2c device as a master:
polling or interrupts? Currently, my feeling is to favour polling
because interrupts can arrive at a stunning rate, up to 400,000 per
second (i2c Fast mode). My processor (XScale PXA270, which has two
builtin i2c devices) may take in the order of a us. to service an
interrupt, because usually devices are connected to the slow 13MHz
device clock, which takes a few cycles to respond and synchronise.
Moreover, having interrupts would add to the Worst Case Interrupt
Response Time for the important, time-critical devices, while my feeling
is that in polling mode the Interrupt Response Time would hardly be
On the other hand, the examples in eCos CVS seem to favour interrupt mode.
What does the list think about this?
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss