public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Serial FIFO problem  (i386 only)
@ 2000-11-21 21:14 Fabrice Gautier
  2000-11-22  4:59 ` Dave Airlie
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Gautier @ 2000-11-21 21:14 UTC (permalink / raw)
  To: Ecos-List (E-mail)

Hi,

I think other people have experienced some problem with serial, but I don't
remember if anyone has reported something like that.

I've configured eCos with a serial driver for com1 (aka /dev/ser0). But i
didn't get any interrutps. When the serial port was used by RedBoot i get
the interrupt (ctrl-C worked).

The IO chip in the PC board seems to be a Winbond w83877F. This is detected
as a 16550a, which is what the doc at winbond.com says it is.

The faulty code is here (pc_serial.c:231):

if (port->deviceType == s16550a)
	pc_outb(port->base + FCR, FCR_FE | FCR_RFR | FCR_TFR | FCR_RT14);

The bad thing is the FCR_RT14: this configure the UART to trigger an
interrupt only when 14 bytes are on. But I only want to read 1 byte. 

changing the whole line to :
	pc_outb(port->base + FCR, 0);
or simply replacing FCR_RT14 by FCR_RT1 seems to works but not very well.

The problem now is that it seems there is always one char keept in some
buffer. I don't get the actual char before sending another char.


Thanks
-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 



-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

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

* Re: [ECOS] Serial FIFO problem  (i386 only)
  2000-11-21 21:14 [ECOS] Serial FIFO problem (i386 only) Fabrice Gautier
@ 2000-11-22  4:59 ` Dave Airlie
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Airlie @ 2000-11-22  4:59 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Ecos-List (E-mail)

Hi,
	the RT_14 means the FIFO will interrupt after 14 chars, *or* if a
rx timeout occurs on the FIFO (which happens if it doesn't
receive a character within a specified time frame
.... check the pc_serial (out of date I
thought PC use ser_165xx or something similiar), that it process a FIFO rx
timeout correctly..

Dave.

On Tue, 21 Nov 2000, Fabrice Gautier wrote:

> Hi,
> 
> I think other people have experienced some problem with serial, but I don't
> remember if anyone has reported something like that.
> 
> I've configured eCos with a serial driver for com1 (aka /dev/ser0). But i
> didn't get any interrutps. When the serial port was used by RedBoot i get
> the interrupt (ctrl-C worked).
> 
> The IO chip in the PC board seems to be a Winbond w83877F. This is detected
> as a 16550a, which is what the doc at winbond.com says it is.
> 
> The faulty code is here (pc_serial.c:231):
> 
> if (port->deviceType == s16550a)
> 	pc_outb(port->base + FCR, FCR_FE | FCR_RFR | FCR_TFR | FCR_RT14);
> 
> The bad thing is the FCR_RT14: this configure the UART to trigger an
> interrupt only when 14 bytes are on. But I only want to read 1 byte. 
> 
> changing the whole line to :
> 	pc_outb(port->base + FCR, 0);
> or simply replacing FCR_RT14 by FCR_RT1 seems to works but not very well.
> 
> The problem now is that it seems there is always one char keept in some
> buffer. I don't get the actual char before sending another char.
> 
> 
> Thanks
> 

-- 
      David Airlie, Software Engineer, Parthus Technologies plc.,
       Mary Rosse Centre, National Tech Park, Limerick, Ireland.
   t: +353-61-508116 / f: +353-61-508101 / David.Airlie@parthus.com

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

end of thread, other threads:[~2000-11-22  4:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-21 21:14 [ECOS] Serial FIFO problem (i386 only) Fabrice Gautier
2000-11-22  4:59 ` Dave Airlie

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