Serial Port Baud Rate

Brown, David (dbrown03) DBrown03 at
Tue Aug 8 06:37:31 EST 2000

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: commproc.c.patch.gz
Type: application/octet-stream
Size: 509 bytes
Desc: not available
Url : 

More information about the Linuxppc-embedded mailing list