From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3359 invoked by alias); 9 Jul 2007 22:43:47 -0000 Received: (qmail 3331 invoked by uid 22791); 9 Jul 2007 22:43:45 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-vbr10.xs4all.nl (HELO smtp-vbr10.xs4all.nl) (194.109.24.30) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 09 Jul 2007 22:43:43 +0000 Received: from athlon64.lindengracht.nl (cust.7.108.adsl.cistron.nl [62.216.7.108]) by smtp-vbr10.xs4all.nl (8.13.8/8.13.8) with ESMTP id l69MhbAk071306; Tue, 10 Jul 2007 00:43:38 +0200 (CEST) (envelope-from rutger@cs.vu.nl) Message-ID: <4692BA5D.9010003@cs.vu.nl> Date: Mon, 09 Jul 2007 22:43:00 -0000 From: Rutger Hofman User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: ecos-discuss@ecos.sourceware.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] i2c: polled or interrupts? X-SW-Source: 2007-07/txt/msg00087.txt.bz2 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 influenced. 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