MIRC Frederi(deleted)
|
ERROR – Reading serial port (devc-ser8250)
|
MIRC Frederi(deleted)
11/17/2014 4:31 AM
post112358
|
ERROR – Reading serial port (devc-ser8250)
Context:
• CPU : x86 (CME137686LX)
• QNX : 6.3.2
Using Serial Ports CPU (ser1 and SER2) and an expansion card (SER3 ... ser6); devc-ser8250 driver provided by QNX.
Serial port configuration :
devc-ser8250 -b9600 -E -F -u1 3F8,0x4 &
devc-ser8250 -b9600 -E -F -u2 2F8,0x3 &
devc-ser8250 -b9600 -E -F -u3 100,0x5 &
devc-ser8250 -b9600 -E -F -u4 108,0x6 &
devc-ser8250 -b9600 -E -F -u5 110,0x7 &
devc-ser8250 -b9600 -E -F -u6 118,0x9 &
Software:
The software attached software is a test. I use this same implementation in much bigger software.
The serial port is configured as follows:
• Baudrate: 115200bauds
• Parity: None
• Stop bit: 1
• Number of bits: 8
For read on a serial port I use the notification system QNX (_NOTIFY_ACTION_TRANARM).
In front I use a Windows application that sends messages to high frequency; generating a data stream of about 60Kbit/s.
Problem:
Sometimes when reading, the read function indicates you have read more byte requested.
For example, I ask reading two bytes. The read function tells me to read 3, 4, etc ... bytes. Strange! Normally is
impossible?
These characters seem to be read, but I am not well provided. They are not in my buffer and ask if I read these are not
present.
Tests:
I've done other tests, no effect:
• Using different serial ports
• Using different CPU
• Using different IRQ
• Using _NOTIFY_ACTION_POLLARM.
Using a simple read (blocking or not) or a select corrects this problem. This solution does not satisfy me because this
implies the complete modification my software (thread, etc.).
Does anyone have a solution? Maybe my implementation is not it ok? ... I have no idea...
Thank you in advance
|
|
|