All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@horizon.com
To: linux-kernel@vger.kernel.org
Cc: stuartm@connecttech.com
Subject: Re: Serial custom speed deprecated?
Date: 26 Aug 2006 15:35:13 -0400	[thread overview]
Message-ID: <20060826193513.27481.qmail@science.horizon.com> (raw)

> Also, Oxford's 16PCI95x family has three different points of altering
> the clock; the clock prescaler, the actual sample rate (which is the
> classic /16 that most are used to), and the actual divisor. That can
> produce pretty much any baud rate, albeit with some error.

Their data sheet doesn't explain it too well, but it looks like they
use a similar implementation to the MSP430 UARTs, which are designed
to work with very low clock rates.  (32768 Hz watch crystals are
popular.)

Just as a reminder, UART receive operation is generally:
- After detecting a falling edge, wait half a bit time.
- Sample the input 3x and majority-vote.  If the input
  line is still low, call this a start bit and prepare to
  receive a character.
- Wait one bit time, sample 3x, and call the majority the start bit.
- Repeat for all data bits and the stop bit.  If the stop bit isn't
  1 as expected, note a framing error.

This is traditionally done by running a 16x clock sampling the
input, and after detecting a start bit on one clock (call that
clock 0), sample the start bit on clocks 7, 8 and 9, the first bit
on clocks 23, 24 and 25, etc.

MSP430 UARTs have a fully programmable clocks/bit number (no fixed /16,
although you want a few clocks per bit so the standard "sample 3x and
majority vote" algorithm works), and can add +1 clock to individual
bit times to approximate a desired baud rate more closely by dithering.
Oh, and they use both edges of the clock.

So it can go to a baud rate 1/3 of the input baud clock (sample the
start bit at 1, 1.5 and 2 clocks, then the first bit at 4, 4.5 and 5,
etc.), and proceed to 9/24, 10/24, etc.

             reply	other threads:[~2006-08-26 19:35 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-26 19:35 linux [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-08-26 18:16 Serial custom speed deprecated? linux
2006-08-26 19:37 ` Ian Stirling
2006-08-26 20:30   ` linux
2006-08-28 12:17 ` linux-os (Dick Johnson)
2006-08-28 14:39   ` Alan Cox
2006-08-28 14:50     ` linux-os (Dick Johnson)
2006-08-28 15:51       ` Michael Poole
2006-08-28 16:57         ` linux-os (Dick Johnson)
2006-08-28 17:40           ` Michael Poole
2006-08-28 18:04             ` linux-os (Dick Johnson)
2006-08-28 17:01       ` Alan Cox
2006-08-28 17:24         ` linux
     [not found] <6N8LR-22A-5@gated-at.bofh.it>
     [not found] ` <6Njxz-797-13@gated-at.bofh.it>
     [not found]   ` <6NqfR-5Ld-49@gated-at.bofh.it>
     [not found]     ` <6NrbQ-7Ab-27@gated-at.bofh.it>
     [not found]       ` <6NsB4-2GL-37@gated-at.bofh.it>
     [not found]         ` <6NvSc-1go-31@gated-at.bofh.it>
2006-08-25 11:40           ` Nick Craig-Wood
2006-08-23 21:41 Stuart MacDonald
2006-08-24  9:18 ` David Woodhouse
2006-08-24 12:41   ` Stuart MacDonald
2006-08-24 13:19     ` Alan Cox
2006-08-24 13:03       ` David Woodhouse
2006-08-24 16:27   ` Krzysztof Halasa
2006-08-24 17:41     ` Alan Cox
2006-08-24 18:51       ` Krzysztof Halasa
2006-08-24 20:43         ` linux-os (Dick Johnson)
2006-08-24 20:43           ` linux-os (Dick Johnson)
2006-08-24 22:11           ` Alan Cox
2006-08-27  6:52             ` Rogier Wolff
2006-08-27  6:52               ` Rogier Wolff
2006-08-27 10:00               ` Russell King
2006-08-28 14:14               ` Stuart MacDonald
2006-08-28 14:14                 ` Stuart MacDonald
2006-08-28 20:09                 ` Russell King
2006-08-29  6:20                   ` Rogier Wolff
2006-08-29  6:20                     ` Rogier Wolff
2006-08-29  7:46                     ` Russell King
2006-08-25 15:17           ` Stuart MacDonald
2006-08-25 15:17             ` Stuart MacDonald
2006-08-25 15:52             ` linux-os (Dick Johnson)
2006-08-25 15:52               ` linux-os (Dick Johnson)
2006-08-24 22:43         ` Alan Cox
2006-08-25 10:58           ` Krzysztof Halasa
2006-08-25 15:21           ` Stuart MacDonald
2006-08-25 15:21             ` Stuart MacDonald
2006-08-25 19:32             ` Russell King
2006-08-25 20:21               ` Stuart MacDonald
2006-08-25 20:21                 ` Stuart MacDonald
2006-08-25 20:54                 ` linux-os (Dick Johnson)
2006-08-25 20:54                   ` linux-os (Dick Johnson)
2006-08-25 20:39               ` Theodore Tso
2006-08-26 12:16                 ` Krzysztof Halasa
2006-08-25 15:10         ` Stuart MacDonald
2006-08-25 15:10           ` Stuart MacDonald
2006-08-24 22:05       ` Russell King
2006-08-25 15:01       ` Stuart MacDonald
2006-08-25 15:01         ` Stuart MacDonald

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=20060826193513.27481.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stuartm@connecttech.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.