500kbps serial port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm trying to set up a serial port on our industrial PC board to run at
500kbps baudrate. According to the board manufacturer it should be
possible but I keep failing. The board is RTD CMX158886 cpu module with
SMSC SCH3116 SuperIO chip providing two serial ports.

At 115200 I can feed data into /dev/ttyS0 at roughly 10kB/s which is
expected. But I have never achieved anything better than this.

First I tried setserial with all different combinations of options
(including spd_cust, baud_base and divisor setting) but either they
didn't make any difference or made the port slower.

Then I wrote a simple kernel module for setting the UART parameters
directly on the SuperIO chip - one of its registers is supposed to
switch it to faster input clock and thus allow up to 1.5Mbps baudrate.
But again all my attempts either seemed ignored by the system or made
things even worse.

Finally I found some hints about setting "tty->termios->c_cflag speed to
B38400 and the desired baudrate be in tty->alt_speed". Here 'tty' is
apparently of 'struct tty_struct' type, but I haven't found how to
retrieve the current tty_struct for a port and how to set it back. All I
found are tcgetattr() and tcsetattr() functions but these seem to
provide only 'struct termios', not the parent struct tty_struct.

I understand that support for non-standard baudrates is hw-dependent,
however our HW should support them. I just don't know how to turn it on.

Do you have any hints? Either through kernel module or user space?

Thanks!

Michal







--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux