Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Role of FIFO Buffer for COM Port in windows

can anyone here please explain the role of FiFo Buffer check (at advanced COM Port settings from device manager) in windows?

How checking/unchecking the FIFO Buffer affects reading data from COM Port?

Many Thanks in advance for helpful replies!

like image 409
Adil Avatar asked Jan 16 '14 14:01

Adil


People also ask

Why use FIFO buffer?

FIFOs reduce the chances of data loss by 'buffering' the data. This way the device driver can then read all of the data from the FIFO in one go, whilst communication is still continuing. If you imagine someone asking you to load apples on to a lorry.

What is FIFO buffering?

A FIFO is a special type of buffer. The name FIFO stands for first in first out and means that the data written into the buffer first comes out of it first. There are other kinds of buffers like the LIFO (last in first out), often called a stack memory, and the shared memory.

What is FIFO serial port?

A FIFO (First In First Out) is a UART buffer that forces each byte of your serial communication to be passed on in the order received. For an 8250 or 16450 UART, for example, the FIFO has a size of only one byte.


1 Answers

The original UART chip used in IBM-PC designs was the 8250. It could store just one received byte while the receiver was busy receiving the next byte. That puts a high demand on the responsiveness of the operating system's serial port driver, responding to the "data received" interrupt. It must be quick enough to read that byte before the receiver overwrites it. Not being quick enough causes an overrun error and irretrievable data loss. High interrupt rates are also detrimental.

That design was improved upon by the 16550 UART chip. It got a larger buffer, the FIFO, giving the OS more time to empty the buffer before an overrun could occur. The serial port driver can program it to generate an interrupt at a particular fill level, thus reducing the interrupt rate as well.

But chips designs have the same kind of problem that software has, the original 16550 had a bug in the FIFO implementation. Fixed in the 16550A, version 1.1 in software speak.

Problem was, the driver could not tell whether the machine had the buggy version of the 16550 or a good one. Simple chips like that don't have a GetVersion() equivalent. So it provided a property page that lets the user turn the FIFO support off, thus bypassing the bug.

The odds that today you'll have the buggy version are zero. Turning the FIFO off is no longer necessary.

like image 107
Hans Passant Avatar answered Sep 19 '22 06:09

Hans Passant