public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* Question to 16x5x driver users
@ 2007-06-18 13:11 Alexander Aganichev
  2007-06-19  7:01 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Aganichev @ 2007-06-18 13:11 UTC (permalink / raw)
  To: ecos-devel

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.

-- 
WBR, Alexander

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question to 16x5x driver users
  2007-06-18 13:11 Question to 16x5x driver users Alexander Aganichev
@ 2007-06-19  7:01 ` Guennadi Liakhovetski
  2007-06-19 11:25   ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Guennadi Liakhovetski @ 2007-06-19  7:01 UTC (permalink / raw)
  To: Alexander Aganichev; +Cc: ecos-devel

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.

Thanks
Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
Germany

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question to 16x5x driver users
  2007-06-19  7:01 ` Guennadi Liakhovetski
@ 2007-06-19 11:25   ` Gary Thomas
  2007-06-23 10:04     ` unsubscribe capiman@t-online.de Martin Maurer
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2007-06-19 11:25 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Alexander Aganichev, ecos-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* unsubscribe capiman@t-online.de
  2007-06-19 11:25   ` Gary Thomas
@ 2007-06-23 10:04     ` Martin Maurer
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Maurer @ 2007-06-23 10:04 UTC (permalink / raw)
  To: ecos-devel

unsubscribe capiman@t-online.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-23 10:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-18 13:11 Question to 16x5x driver users Alexander Aganichev
2007-06-19  7:01 ` Guennadi Liakhovetski
2007-06-19 11:25   ` Gary Thomas
2007-06-23 10:04     ` unsubscribe capiman@t-online.de Martin Maurer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).