From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21857 invoked by alias); 19 Jun 2007 11:25:43 -0000 Received: (qmail 21847 invoked by uid 22791); 19 Jun 2007 11:25:42 -0000 X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO X-Spam-Check-By: sourceware.org Received: from 204-133-123-27.dia.static.slbbi.com (HELO mail.chez-thomas.org) (204.133.123.27) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Jun 2007 11:25:40 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 999) id CFDBB195010C; Tue, 19 Jun 2007 05:25:38 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on hermes.chez-thomas.org X-Spam-Level: Received: from [192.168.1.101] (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id 5416E19500C4; Tue, 19 Jun 2007 05:25:36 -0600 (MDT) Message-ID: <4677BD2F.3010909@mlbassoc.com> Date: Tue, 19 Jun 2007 11:25:00 -0000 From: Gary Thomas User-Agent: Thunderbird 1.5.0.10 (X11/20070301) MIME-Version: 1.0 To: Guennadi Liakhovetski CC: Alexander Aganichev , ecos-devel@ecos.sourceware.org Subject: Re: Question to 16x5x driver users References: In-Reply-To: X-Enigmail-Version: 0.94.3.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2007-06/txt/msg00002.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Guennadi Liakhovetski wrote: > On Mon, 18 Jun 2007, Alexander Aganichev wrote: > >> I found that driver not transmit anything in interrupt driving mode >> unless I made the following patch: >> >> Index: packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c >> =================================================================== >> RCS file: >> /cvs/ecos/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c,v >> retrieving revision 1.14 >> diff -u -r1.14 ser_16x5x.c >> --- packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c 27 Nov >> 2006 13:59:50 -0000 1.14 >> +++ packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c 18 Jun >> 2007 12:21:30 -0000 >> @@ -516,6 +516,7 @@ >> HAL_READ_UINT8(base+REG_ier, _ier); >> _ier |= IER_XMT; // Enable xmit interrupt >> HAL_WRITE_UINT8(base+REG_ier, _ier); >> + (chan->callbacks->xmt_char)(chan); // <<<<<< >> } >> >> // Disable the transmitter on the device >> >> Am I right to make this change or I just missed another process that >> should call xmt_char? I'm using LPC2294 based board and use this >> driver for the UART1. > > It looks like eCos uses the usual UART sending procedure - enable tx-empty > (IER_XMT) interrupt and return, then the interrupt should trigger as soon > as tx is empty / tx fifo can take more data, and you write more data in > your interrupt handler to the port. The fact it doesn't work for you means > most probably that you're not getting tx-empty interrupts, and, perhaps, > no UART interrupts at all. In my experience, this [incorrect] behaviour is not all that uncommon. I think that a CDL controlled option to enable this initial "push" (although I'd call it 'priming') is the correct fix. Alexander, please provide a proper patch, along with ChangeLog entry to ecos-patches@ecos.sourceware.org. We'll review and apply as appropriate. - -- - ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world - ------------------------------------------------------------ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFGd70vmaKbSsQGV8ARAqFQAJ0dpBdJMlwo04vgESqSK+W6dNW1yACdFhjf hBhKas2iXs6VTrU69HNeqtw= =7V3c -----END PGP SIGNATURE-----