Thread (1 message) 1 message, 1 author, 2005-02-15

Re: How to set a custom baud rate using 2.6 linux distro on MPC5200 based board?

From: Eric N. Johnson (ACD) <hidden>
Date: 2005-02-15 23:53:40

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.

Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help