From: "Caruso, Nick" <ncaruso@irobot.com>
To: "Eric N. Johnson (ACD)" <ejohnson@acdstar.com>,
<linuxppc-embedded@ozlabs.org>
Subject: RE: How to set a custom baud rate using 2.6 linux distro on MPC5200 based board?
Date: Wed, 16 Feb 2005 16:39:15 -0500 [thread overview]
Message-ID: <712A2DEC228C7448978CBD7A7AD5B090592CFB@fever.wardrobe.irobot.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]
-----Original Message-----
From: linuxppc-embedded-bounces@ozlabs.org on behalf of Eric N. Johnson (ACD)
Sent: Tue 2/15/2005 6:55 PM
To: linuxppc-embedded@ozlabs.org
Subject: Re: How to set a custom baud rate using 2.6 linux distro on MPC5200 based board?
>I'm trying to set a custom baud rate (500KBaud, in case anyone cares) on
>one of the PSCs on a MPC5200 board.
[snip]
> serial_info.flags = ASYNC_SPD_CUST | ASYNC_LOW_LATENCY;
> serial_info.custom_divisor = 48; // clock on FTDI chip / 48 == 500KB
>
> if ( ioctl(tty_fd, TIOCSSERIAL, &serial_info ) < 0) {
> perror("config_serial_port: ioctl TIOCSSERIAL");
> return(-1);
> }
>
>This compiled fine under the ppc cross-dev tools we have but it fails with
>an "invalid argument" error when run on the ppc board.
It looks like this code was written for an FTDI serial port. The FTDI is a
USB to Serial converter that handles baud rate generation very differently
from a standard UART.
_______________________________________________
Yes, it was originally written for a USB-to-serial adapter. However it is my belief that the clock divisor thing works with any serial device, including so-called 16550 devices.
I think there may be a problem where TIOCSSERIAL doesn't work for the MPC5200 PSC uart code. It seems that if I get the ports' attributes with TIOCGSERIAL and immediately set the same values on the same port I get an error return from the ioctl call. I'm talking with our BSP vendor about this.
best regards,
Nick Caruso
[-- Attachment #2: Type: text/html, Size: 2346 bytes --]
next reply other threads:[~2005-02-16 21:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-16 21:39 Caruso, Nick [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-02-15 21:33 How to set a custom baud rate using 2.6 linux distro on MPC5200 based board? Caruso, Nick
[not found] ` <712A2DEC228C7448978CBD7A7AD5B090592CE2@fever.wardrobe.irob ot.com>
2005-02-15 23:55 ` Eric N. Johnson (ACD)
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=712A2DEC228C7448978CBD7A7AD5B090592CFB@fever.wardrobe.irobot.com \
--to=ncaruso@irobot.com \
--cc=ejohnson@acdstar.com \
--cc=linuxppc-embedded@ozlabs.org \
/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