[ECOS] i2c: polled or interrupts?

Rutger Hofman rutger@cs.vu.nl
Mon Jul 9 22:43:00 GMT 2007

Hi list,

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?

Rutger Hofman
VU Amsterdam

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 mailing list