By default, a serial port driver automatically detects the I/O port and IRQ.
A standard PC system uses the devc-ser8250 driver; the BSP documentation indicates the drivers specific to your target hardware.
If the driver doesn't detect all the serial ports, ensure that the ports are enabled in the BIOS. If the ports are enabled, try specifying the I/O port and IRQ of the ports when you start the driver. Use a comma to separate the I/O port and the IRQ; use a space to separate each port-IRQ pair in the command. For example:
devc-ser8250 3f8,4 2f8,3
The standard devc-ser8250 driver supports only the RS-232 protocol.
The serial drivers support software and hardware flow control:
stty +osflow +isflow < /dev/ser1
stty -osflow -isflow < /dev/ser1
stty +ohflow +ihflow < /dev/ser1
stty -ohflow -ihflow < /dev/ser1
Heavy serial port usage can be very taxing on some systems; by default, the serial adapter triggers an interrupt for each character transmitted or received. You can use these options to reduce the number of interrupts:
A receive timeout guarantees that the characters won't remain buffered too long. For example, imagine that the device receives:
This sentence is coming across the serial port.
By default, the system has to service 47 interrupts to receive this sentence. If you set the receive trigger level to 14, the number of interrupts is reduced to four. This helps the overall system performance, but you're trading off reliability; the higher the receive trigger (-t), the higher the possibility of losing data.