public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Frank Young <young726@hotmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] How to decide UART CFG_BASE_BAUD?
Date: Tue, 18 May 2004 12:30:21 -0400	[thread overview]
Message-ID: <BAY2-F46ofWM5UgLEsg0001e35c@hotmail.com> (raw)

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/

                 reply	other threads:[~2004-05-18 16:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAY2-F46ofWM5UgLEsg0001e35c@hotmail.com \
    --to=young726@hotmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox