[Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread CHABAL David
Hello, I met some trouble with the 16550A driver provided in Xenomai 2.3.1 and my Moxa cards (PCI / 8 * RS232 / 168U ). It was a problem of baudrate computation before setting the LCR_DLAB register. The formula implemented by the Xenomai driver is different from the one provided by Moxa. So I

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Maksym Veremeyenko
CHABAL David пишет: I met some trouble with the 16550A driver provided in Xenomai 2.3.1 and my Moxa cards (PCI / 8 * RS232 / 168U ). It was a problem of baudrate computation before setting the LCR_DLAB register. The formula implemented by the Xenomai driver is different from the one

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Jan Kiszka
Maksym Veremeyenko wrote: CHABAL David пишет: I met some trouble with the 16550A driver provided in Xenomai 2.3.1 and my Moxa cards (PCI / 8 * RS232 / 168U ). It was a problem of baudrate computation before setting the LCR_DLAB register. The formula implemented by the Xenomai driver is

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread CHABAL David
Le 11/5/2007, Jan Kiszka [EMAIL PROTECTED] a écrit: Maksym Veremeyenko wrote: CHABAL David пишет: I met some trouble with the 16550A driver provided in Xenomai 2.3.1 and my Moxa cards (PCI / 8 * RS232 / 168U ). It was a problem of baudrate computation before setting the LCR_DLAB

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Jan Kiszka
CHABAL David wrote: Le 11/5/2007, Jan Kiszka [EMAIL PROTECTED] a écrit: Maksym Veremeyenko wrote: CHABAL David пишет: I met some trouble with the 16550A driver provided in Xenomai 2.3.1 and my Moxa cards (PCI / 8 * RS232 / 168U ). It was a problem of baudrate computation before

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Jan Kiszka
CHABAL David wrote: Hello, I met some trouble with the 16550A driver provided in Xenomai 2.3.1 and my Moxa cards (PCI / 8 * RS232 / 168U ). It was a problem of baudrate computation before setting the LCR_DLAB register. The formula implemented by the Xenomai driver is different from the

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Maksym Veremeyenko
CHABAL David пишет: Maksym, what is the kind of yours connections ? (PC - PC with the same moxa cards inside the 2 boxes, or PC - other device ) ? (In the 1st the case the both clocks are configured with the same value.) in first case (8 ports board): - 2 ports (at 38400) to linux host,

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Jan Kiszka
Jan Kiszka wrote: CHABAL David wrote: Le 11/5/2007, Jan Kiszka [EMAIL PROTECTED] a écrit: Maksym Veremeyenko wrote: CHABAL David пишет: I met some trouble with the 16550A driver provided in Xenomai 2.3.1 and my Moxa cards (PCI / 8 * RS232 / 168U ). It was a problem of baudrate

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread CHABAL David
Le 11/5/2007, Jan Kiszka [EMAIL PROTECTED] a écrit: Jan Kiszka wrote: CHABAL David wrote: Le 11/5/2007, Jan Kiszka [EMAIL PROTECTED] a écrit: Maksym Veremeyenko wrote: CHABAL David пишет: I met some trouble with the 16550A driver provided in Xenomai 2.3.1 and my Moxa

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Jan Kiszka
Maksym Veremeyenko wrote: Jan Kiszka пишет: moxa: 912.600/115.200 = 8 xeno: = 7 Yeah, hard arguments. This really cries for a moxa tweak. (The alternative would be to pass an artificially increased baud_base - but that would be _really_ ugly and we could also ask the user for the divider

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Maksym Veremeyenko
CHABAL David пишет: moxa: 921600/115200 = 8 (not 7, I apologize for this mistake but we guess here that the baud base is always 921600 and according to the mxser file it can be 230400 for some cards) Then for 'some cards' it's possible to specify 'baud_base' parameter. What can i

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Jan Kiszka
CHABAL David wrote: Le 11/5/2007, Jan Kiszka [EMAIL PROTECTED] a écrit: CHABAL David wrote: In additional: 1. You should use 921600 value instead of 912.600. The . was here for reading facility only, I consider it as an integer in my computations. The point was not the point, but the

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread CHABAL David
Le 11/5/2007, Jan Kiszka [EMAIL PROTECTED] a écrit: CHABAL David wrote: In additional: 1. You should use 921600 value instead of 912.600. The . was here for reading facility only, I consider it as an integer in my computations. The point was not the point, but the flipped digits.

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Maksym Veremeyenko
CHABAL David пишет: Oupsss, I'm beaten :-( The only case with a different value that I found is for 1200: (230400+1200)/1200 = 193 230400/1200 = 192 (230400+600)/1200 = [192,5] = 192 230400/1200 = 192 -- Maksym Veremeyenko

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Maksym Veremeyenko
Jan Kiszka пишет: (230400+57600)/115200=2,5 = 2 230400/115200=2 IMHO - even if result was '3' - i would suggest to use formula that gives '3' because it's more correct. So we have the same results for both formulas and I don't see the need for a patch anymore. Do you? Otherwise I

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread CHABAL David
Le 11/5/2007, Maksym Veremeyenko [EMAIL PROTECTED] a écrit: CHABAL David ÐÉÛÅÔ: Oupsss, I'm beaten :-( The only case with a different value that I found is for 1200: (230400+1200)/1200 = 193 230400/1200 = 192 (230400+600)/1200 = [192,5] = 192 230400/1200 = 192 --

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Jan Kiszka
CHABAL David wrote: In additional: 1. You should use 921600 value instead of 912.600. The . was here for reading facility only, I consider it as an integer in my computations. The point was not the point, but the flipped digits. (921600 + (115200 div 2)) div 115200 = 8 So back to

Re: [Xenomai-core] 16550A driver and Moxa card / solved

2007-05-11 Thread Jan Kiszka
CHABAL David wrote: Le 11/5/2007, Maksym Veremeyenko [EMAIL PROTECTED] a écrit: CHABAL David ÐÉÛÅÔ: Oupsss, I'm beaten :-( The only case with a different value that I found is for 1200: (230400+1200)/1200 = 193 230400/1200 = 192 (230400+600)/1200 = [192,5] = 192 230400/1200 = 192 --