I was trying out different receive and transmit buffer settings for the serial driver available with QNX(devc-ser820). I loaded the driver for transmit buffer of 1 and for receive buffer tried all the available options(1,4,8 and 14). Here it was observed that the read blocks till the specified receive characters are available in the buffer.( This was as per desired.)
But when receive buffer was set to 1 and transmit buffer was varied for different settings of 1,4,8 and 14, there was no change visible in reading, please tell me a way for validating the different settings for transmit buffer.
The driver used is : devc-ser8250 -b 9600 -T4 -t1 3f8,4 &
Thanks for the help in advance…
Why would think that changing the transmit buffer would affect reading?
My understanding was when -T4 is set, writing to Tx pin should not happen till 4 characters are available in the transmit buffer. If I try to read during this time(till 4 characters are available) my read() should fail since write has not happened and data not available.
Please correct me if my understanding is wrong. Is there an alternative way of validating transmit buffer for the serial driver.
You understanding is wrong. Data is transfer as fast as possible BUT there is only one interrupt per 4 bytes transmitted ( or after a timeout if only 3 bytes are transmitted).
I wrote a 16550 UART driver a while ago, but I was curious about this, so I looked up some documentation on-line. While there is a Read buffer configuration, there does not seem to be a configuration for the TX buffer. Instead, the TX interrupt fires when the TX buffer is drained.
This seems a little sub-optimal to me, but I couldn’t find anything in the documentation to contradict this.
Thanks mario and maschoen for your help
where do i get more info on the timeout that happends during transmission and reception. may be i could use that info in my task of testing transmit buffer settings for serial port.
If you google “16550 specifications” or something similar, you should find the documentation.