Maximum baudrate of devc-ser8250

Hi everybody!
I have some trouble in an application with 2 serial ports. The
hardware uses the devc-ser8250 driver and can supports a baudrate up
to 921600, so I launch the driver in this way:
devc-ser8250 -c 14745600/16 -u3 a800,3 -u4 a808,3&
and configure the hardware to support the baudrate of 921600. But when
I connect the 2 ports as a loop for data transferring test, data loss
will appears, some times even the NULL character will be received. It
is the same when the hardware’s baudrate is set to 460800. The
hardware can work fine when the baudrate is no higher than 230400.
I understand that the maximum baudrate defined in the headfile
termios.h is 115200, but higher baudrates such as 230400, 460800 and
921600 are all defined in a headfile of myself, and the experiment
result shows that it works fine at baudrate of 230400 that is not
defined in the system. It seems not to be the problem that I use
baudrates defined by myself.
I am confused and wonder to know what is the maximum baudrate that
devc-ser8250 can support? Whether there is any problem in my way?
Thanks in advance.

From src of devc-ser8250:
value =clk/(baud * div)); - this value wiil be write to registers DL0
and DL1:

set_port(port[REG_DL0], 0xff, value & 0xff);
set_port(port[REG_DL1], 0xff, value >> :sunglasses:;
where first 0xFF is the mask.

So when higher speed then smaller “value”.
value=1 will be when yous you set CLK/DIV = 14745600/16 and baud
921600
If this registers of you hardware (see manual) set to 1 what baudrate
will be?

Smile is must be “8”

Norta wrote:

Hi everybody!
I have some trouble in an application with 2 serial ports. The
hardware uses the devc-ser8250 driver and can supports a baudrate up
to 921600, so I launch the driver in this way:
devc-ser8250 -c 14745600/16 -u3 a800,3 -u4 a808,3&
and configure the hardware to support the baudrate of 921600. But when
I connect the 2 ports as a loop for data transferring test, data loss
will appears, some times even the NULL character will be received. It
is the same when the hardware’s baudrate is set to 460800. The
hardware can work fine when the baudrate is no higher than 230400.

I don’t know anything about devc-ser8250. However, are you sure that the
hardware really supports these high baud rates? What kind of transceivers
are you using? Most RS-232 transceivers are not designed for much more than
115Kbaud.

If you can, you might put an oscilloscope on the data lines and see what the
signal looks like.


Bert Menkveld
P. Eng.
B&E Technologies
bert@betech.biz
Ph: 519-669-0950

Bert, thanks for your attention. I am sure that the hardware can
support the baud 921600 because I have tested that in windows with a
specific driver. The hardware uses UART 16c550, so it can support the
bauds I have mentioned before.

qnxloader, thank you very much. I think I have some misunderstanding
before. When I set the clock rate to 14745600 and baud to 921600, the
divisor should be 1, is it right?

If I launch devc-ser8250 with a -c argument but no divisor value is
specified, will the divisor value be set automatically according to
the clock rate and the baud I use?
Thanks.

I have used some serial cards capable of more than 115200 with standard
driver. These cards were desingned in such a way that you should specify
1/8th of the speed you wanted.

E.g if I wanted to communicate at 9600 I had to specify 1200Bd.

Could you try it in this way?

PKY


“Norta” <acmmkaka.l@gmail-dot-com.no-spam.invalid> wrote in message
news:eon1pq$fjt$1@inn.qnx.com

Hi everybody!
I have some trouble in an application with 2 serial ports. The
hardware uses the devc-ser8250 driver and can supports a baudrate up
to 921600, so I launch the driver in this way:
devc-ser8250 -c 14745600/16 -u3 a800,3 -u4 a808,3&
and configure the hardware to support the baudrate of 921600. But when
I connect the 2 ports as a loop for data transferring test, data loss
will appears, some times even the NULL character will be received. It
is the same when the hardware’s baudrate is set to 460800. The
hardware can work fine when the baudrate is no higher than 230400.
I understand that the maximum baudrate defined in the headfile
termios.h is 115200, but higher baudrates such as 230400, 460800 and
921600 are all defined in a headfile of myself, and the experiment
result shows that it works fine at baudrate of 230400 that is not
defined in the system. It seems not to be the problem that I use
baudrates defined by myself.
I am confused and wonder to know what is the maximum baudrate that
devc-ser8250 can support? Whether there is any problem in my way?
Thanks in advance.

Nortawrote:
When I set the clock rate to 14745600 and baud to 921600, the divisor

should be 1, is it right?
No, if clock rate 14745600 and divisor 16 then baudrate = 921600.

Nortawrote:
If I launch devc-ser8250 with a -c argument but no divisor value is

specified, will the divisor value be set automatically according to
the clock rate and the baud I use?

Thanks.
No, if don’n specify “-c clk/div” than will be used defaults

1843200/16

qnxloaderwrote:

[quote:1eecea40da=“Norta”]If I launch devc-ser8250 with a -c argument

but no divisor value is specified, will the divisor value be set
automatically according to the clock rate and the baud I use?

Thanks.
No, if don’n specify “-c clk/div” than will be used defaults

1843200/16[/quote:1eecea40da]
I mean if I configure it like this:
devc-ser8250 -b 921600-c 14745600 -u3 a800,3 -u4 a808,3&
what the result would be?
Thank you, qnxload.


I have used some serial cards capable of more than 115200 with
standard
driver. These cards were desingned in such a way that you should
specify
1/8th of the speed you wanted.
E.g if I wanted to communicate at 9600 I had to specify 1200Bd.
Could you try it in this way?
PKY

If you specify clk/div of your hardware you must specify 9600 if you
want to comunicate 9600 :slight_smile:

Pavel Kycinawrote:
I have used some serial cards capable of more than 115200 with

standard

driver. These cards were desingned in such a way that you should
specify
1/8th of the speed you wanted.

E.g if I wanted to communicate at 9600 I had to specify 1200Bd.

Could you try it in this way?

PKY

Thanks, Pavel. I have noticed the situation you mentioned. But the

card I use is not in that range.

Nortawrote:

I mean if I configure it like this:
devc-ser8250 -b 921600-c 14745600 -u3 a800,3 -u4 a808,3&
what the result would be?
Thank you, qnxload.

You will have divisor 16 and “value=1”(that write to
hardware register) and what is that speed see manual on you hardware.

Hello, everybody. Thanks a lot. Everyone involved in here is
appreciated.
The problem has been resolved. When I launched the devc-ser8250 with a
-t 14 argument, overrun error occurred and appeared data loss. After I
modified the -t 14 argument to -t 8, it goes OK.

I have made a mistake on the forum that I did not tell every argument
I used. Anyway, I have got many help from here. Thanks again,
especially for qnxloader.