in reply to Re: Losing bytes with Device::SerialPort ?
in thread Losing bytes with Device::SerialPort ?
You are holding the serial port open so the serial port driver will certainly receive all the data that comes in for you, whether or not your process is scheduled.
You are wrong. There is absolutely no certainty that the device driver will be able to offload each byte from the UART in a timely manner, and with the FIFO buffering disabled, it is 16 or 64 times more likely not to be able to do so.
It has nothing to do with whether the process is scheduled, or whether the serial port is open or not. The problem is one of timely response by the device driver to each IRQ request. With the hardware buffering turn off, data loss is endemic at anything above very low transmission speeds. Any higher priority IRQ activity (like DMA requests) can prevent the DD from storing the inbound byte before the next one replaces it. This can be mitigated to some extent by enabling rts/cts or XON/XOFF handshaking, but the net result is that you reduce throughput to a crawl.
This may have nothing or everything to do with the OPs problem, but it is certainly one way that his symptoms could occur.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Losing bytes with Device::SerialPort ?
by Celada (Monk) on Dec 22, 2005 at 22:48 UTC | |
by BrowserUk (Patriarch) on Dec 22, 2005 at 23:05 UTC |