Uart 16c950 speed is higher than B4000000 (4 Mbps)

everything, I work with a high-speed RS422 pci card (OXPCIe958) under Ubuntu. The device can work up to 15 Mbps. I need to work at a speed of 10 Mbit / s, but I notice that under Linux, if we use termois, the maximum speed that you can specify is B4000000 (4 Mbit / s).

Is there a way to specify custom baund speed in linux ?? I tried changing the values ​​in termois.h:

#define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 --> by default this is the last value #define B4500000 0010018 --> Added #define B5000000 0010020 --> Added //#define __MAX_BAUD B4000000 --> Default value #define __MAX_BAUD B10000000 

But the changes do not work. I cannot understand the meaning of the value assigned by BXXXXXX !!

The device runs on Linux, and the driver should not be specified. Looking at the device data table, I saw that to indicate the target baund speed, we need to set some registers that change the pre-divider, latch divider and approximate hours.

According to the technical data sheet, the baund rate is determined as follows:

Baundrate = inputclok / (sampleClock * divisor * prescaler)

Is there a way to install these registers under Linux? the driver is located at 8250.c and 8250_pci.c

Thank you in advance

+5
source share
1 answer

There is a Linux kernel patch on this page that adds direct register mapping so that ioctl() can be used to program custom baud rates. It is quite old, but may be useful to you.

+6
source

Source: https://habr.com/ru/post/1488305/


All Articles