Tech Support > Computer Hardware > Microprocessors > MPC5200 baud rate frequency
MPC5200 baud rate frequency
Posted by Didi on March 21st, 2007


I have a Freescale MPC5200 board I designed a while ago which
comes out of reset (I am writing the flash with a debug monitor
which has served me over the years - I wrote it first for the 68020,
then
I made a CPU32 version, then an MPC8240 version etc...), and the
monitor says something through the UART (I use PSC_6).

But the baud rate is totally off the mark.

I made the other system say the same through its UART
and, measuring the length (43 characters, enough to get an idea
if speeds match) I see the new system is apr. 2.7 times slower
than it should be.

Great, I though I'd just write a 2.7 times lower value in the counter
timer and see what happens. Well, the thing is, nothing happened.
Same time (2.7 times what it should be) again. I just love that kind
of thing when you make dramatic changes only to achieve no change.
I am writing to the so called Counter Timer Upper and then Lower
registers, treat them as 8 bit wide (i.e. I write using a .b access,
stb) and I write the value of 215, which should yield a 19200 baud
given the 132 MHz IPB clock. I already described the effect of
changing the 215 to 79 (or sort of, I lost the precise number, it was
not exactly 2.7, so it may have been 78 or 80, not that it matters).

I am tired now and will reluctantly go to sleep (I hate doing that
with
unsolved basic issues like that).
Hopefully someone will have an idea what am I doing wrong which
will help me tomorrow...

Thanks,

Dimiter

------------------------------------------------------
Dimiter Popoff Transgalactic Instruments

http://www.tgi-sci.com
------------------------------------------------------

Posted by jasen on March 25th, 2007


On 2007-03-21, Didi <dp@tgi-sci.com> wrote:
Not being familar with that hardware I see three possible mistakes.

I hope the new day has brought you success.

1> you were writing the correct value but later overwriting it
2> you were writing the correct value but to the wrong location
3> you were writing the correct value but with an incorrect setup

It may be worth checking the errata in the hardware documentation.

Bye.
Jasen

Posted by Didi on March 26th, 2007


Ah, it did, thanks. There had been more to it than just the baud rate,
I rewrote the UART initialization code in a less ambitious manner
(thus more
reasonable for a first-time out of reset CPU type here) and it worked.

Dimiter

On Mar 25, 12:14 pm, jasen <j...@free.net.nz> wrote:



Similar Posts