[uClinux-dev] slow UART on MCF 5272!

gerg gerg at snapgear.com
Thu Nov 15 07:43:30 EST 2001

Hi Johan,

"Magnusson, Johan" wrote:
> First of all. Thanks for taking interest in my problems!
> (Greg U wrote)
> > baudclk = ((MCF_CLK / mcfrs_baud_table[i]) + 16) / 32;
> --Yes I se your point about the rounding problem and..--
> (I previously wrote)
> >>I also noticed someone pointing out a rounding´problem(in mcfserial.c)
> >>I implemented the proposed solution, without any luck.
> --I added 0.5 instead of 16/32 is that ok too? :) --

Depends on where you added it.
This will involve casting the ints to floats. If you do this
in the wrong place you probably won't be gaining anything.

> (Wei Wang wrote)
> > with the 66MHz crystal, there is no common divider value for all baud
> --Bad--
> (Tom W wrote)
> >I do believe that the error rate is much tighter than %5, IIRC, the
> >buadrate should be within %2.
> --Makes it worse if my UART is that sensitive--
> So what now?
> I am probably not getting exactly 115200. The reason your soultion works for
> you Greg and not for me could be that the other side of our systems have
> baud rate errors in opposite directions, right? Your's to your advantage and
> my to my disadvantage. But what do I know? I'm just a happy amateur!

You milage will vary. I have found the above fix to work with
a wide range if different equipment so far...

> At least your fix made it possible to run my system in 57600Bps and that's
> good enough! Thanks!! I'm dropping this now, but many thanks again.


Greg Ungerer  --  Chief Software Wizard        EMAIL:  gerg at snapgear.com
Snapgear                                       PHONE:    +61 7 3279 1822
825 Stanley St,                                  FAX:    +61 7 3279 1820
Woolloogabba, QLD, 4102, Australia               WEB:   www.snapgear.com
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/

More information about the uClinux-dev mailing list