* [U-Boot-Users] How to decide UART CFG_BASE_BAUD?
@ 2004-05-18 16:30 Frank Young
0 siblings, 0 replies; only message in thread
From: Frank Young @ 2004-05-18 16:30 UTC (permalink / raw)
To: u-boot
I am using PPC 405GP rev E, 200MHz cpu clock. The desired baudrate of UART
is 9600.
According to the manual, developer needs to decide a devisor udiv to get the
serial clock, i.e.
serial clock = cpu clock / udiv
An UART baudrate divisior bdiv is defined as bdiv = serial clock / (desired
baudrate * 16)
I checked the u-boot source code and got a couple of questions:
1. a CFG_BASE_BAUD is defined upfront in u-boot. What is this? Is
CFG_BASE_BAUD = serial clock / 16? If so the serial clock is fixed, instead
of programmable, is that right? But the manual says the serial clock is
programmable through setting the value of udiv. So udiv and the serial
clock, which should be set first? In another word, should udiv be decided by
user and then cpu calculate the serial clock according to udiv, or should
user put a fixed serial clock to let cpu calculate udiv?
2. With two parameters, i.e. cpu clock = 200MHz and UART baudrate = 9600,
can program decide all divisors such as udiv and bdiv? I found a table in a
vxworks boot rom source, which tells developers when clock = 200M, UART
baudrate = 9600, the udiv should be set as 14. How this number comes from?
Or is it just a suggested number?
Thanks!
Frank
_________________________________________________________________
Express yourself with the new version of MSN Messenger! Download today -
it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-05-18 16:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-18 16:30 [U-Boot-Users] How to decide UART CFG_BASE_BAUD? Frank Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox