linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Serial Port Baud Rate
@ 2000-08-07 20:37 Brown, David (dbrown03)
  2000-08-08 19:47 ` Dan Malek
  0 siblings, 1 reply; 4+ messages in thread
From: Brown, David (dbrown03) @ 2000-08-07 20:37 UTC (permalink / raw)
  To: 'linuxppc-embedded@lists.linuxppc.org'

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

I recently had a problem with a serial port, using the HardHat kernel 2.2.13
which is probably getting old by now.  I was using the serial port for PPP,
and I saw more framing errors at 115200 Baud than I expected.

The system clock is 50MHz, and when I calculated what commproc.c set the
baud rate generator to, it came out as 111607 Baud, due to truncation of the
remainder after division.  If rounding were used instead, the baud rate
would be 115740 instead.  I therefore changed commproc.c, as reflected in
the attached patch.  The modified version runs very well at 115200 Baud,
with no framing errors.  I also included a few lines which should in theory
allow very low baud rates, although I have had no reason to test this.
--
Dave Brown, Principal Software Engineer
Harris Corporation, RFCD


[-- Attachment #2: commproc.c.patch.gz --]
[-- Type: application/octet-stream, Size: 509 bytes --]

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

* Re: Serial Port Baud Rate
  2000-08-07 20:37 Brown, David (dbrown03)
@ 2000-08-08 19:47 ` Dan Malek
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Malek @ 2000-08-08 19:47 UTC (permalink / raw)
  To: Brown, David (dbrown03); +Cc: 'linuxppc-embedded@lists.linuxppc.org'


"Brown, David (dbrown03)" wrote:

> ....  The modified version runs very well at 115200 Baud,
> with no framing errors.

Thanks.  What about other baud rates?

> .....  I also included a few lines which should in theory
> allow very low baud rates, although I have had no reason to test this.

But.....I thought you provided this to me before :-)?  I already added
that to source updates.



	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: Serial Port Baud Rate
@ 2000-08-08 21:37 Brown, David (dbrown03)
  2000-08-08 21:59 ` Dan Malek
  0 siblings, 1 reply; 4+ messages in thread
From: Brown, David (dbrown03) @ 2000-08-08 21:37 UTC (permalink / raw)
  To: 'Dan Malek'; +Cc: 'linuxppc-embedded@lists.linuxppc.org'


Baud rates 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 worked
for me, with simple tests.  I have used 9600, 57600, and 115200 far more
than the others.  I did not test any other rates.

The lower Baud rates lose characters when the device is closed before it has
been emptied, but that's a known condition which is usually not a problem
for embedded work.
-- Dave Brown

> -----Original Message-----
> From: Dan Malek [mailto:dan@netx4.com]
>
> "Brown, David (dbrown03)" wrote:
>
> > ....  The modified version runs very well at 115200 Baud,
> > with no framing errors.
>
> Thanks.  What about other baud rates?
>
> > .....  I also included a few lines which should in theory
> > allow very low baud rates, although I have had no reason to
> test this.
>
> But.....I thought you provided this to me before :-)?  I already added
> that to source updates.
>
>
>
> 	-- Dan
>

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Serial Port Baud Rate
  2000-08-08 21:37 Serial Port Baud Rate Brown, David (dbrown03)
@ 2000-08-08 21:59 ` Dan Malek
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Malek @ 2000-08-08 21:59 UTC (permalink / raw)
  To: Brown, David (dbrown03)
  Cc: 'Dan Malek',
	'linuxppc-embedded@lists.linuxppc.org'


"Brown, David (dbrown03)" wrote:
>
> Baud rates 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 worked
> for me, with simple tests.

Thanks (I was mostly giving you a hard time, but I do appreciate the
testing :-).

> The lower Baud rates lose characters when the device is closed before it has
> been emptied, but that's a known condition which is usually not a problem
> for embedded work.

Yeah.  Unfortunately, there isn't any way to know when the last bit of
the UART has left the CPM shifter.  The only method is to delay based upon
the FIFO depth and bit rate.  That obviously isn't implemented very well.


	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2000-08-08 21:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-08 21:37 Serial Port Baud Rate Brown, David (dbrown03)
2000-08-08 21:59 ` Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
2000-08-07 20:37 Brown, David (dbrown03)
2000-08-08 19:47 ` Dan Malek

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 NNTP newsgroup(s).