Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/d/devc-ser8250.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/d/devc-ser8250.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/d/devc-ser8250.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/d/devc-ser8250.html on line 8

devc-ser8250

8250 serial communications manager (QNX Neutrino)


Note: You must be root to start this driver.

Syntax:

devc-ser8250 [[options] 
              [port[^shift][,intr]]]... &

Runs on:

Neutrino

Targets:

x86, PowerPC, and MIPS hardware with an 8250-compatible UART

Options:

The options are position-dependent and affect the subsequent ports.

-b number
The initial baud rate (default 57600).
-C size
The size of the canonical buffer in bytes (default 256).
-c clock[/divisor]
Define a custom clock rate, in hertz, and divisor for the serial port. The default (-c 1843200/16) is suitable for compatible PC serial ports.
-E
Start in raw mode (the default). Software flow control is disabled by default.
-e
Start in edited mode (default raw). Software flow control is enabled by default.
-F
Disable hardware flow control (default to hardware flow control enabled). Hardware flow control is not supported in edited mode.
-f
Enable hardware flow control (default). Hardware flow control is not supported in edited mode.
-I number
The size of the interrupt input buffer in bytes (default 2048).
-O number
The size of the interrupt output buffer in bytes (default 2048).
-o nodaemon
Don't call procmgr_daemon() to make the driver run in the background. Use this option if you need to know when the devc-ser8250 device terminates.
-S|s
Disable / enable software flow control. The default depends on the mode: in raw mode (-E, the default), it's disabled; in edited mode (-e), it's enabled.

The order in which you specify the -E or -e, and -S or -s options matters:

Options Mode Software flow control
-e Edited Enabled
-S -e Edited Enabled
-e -S Edited Disabled
-E Raw Disabled
-s -E Raw Disabled
-E -s Raw Enabled
-T number
Enable the transmit FIFO and set the number of characters to be transmitted at each TX interrupt to 1, 4, 8, or 14. The default is 0 (FIFO disabled).
-t number
Enable the receive FIFO and set its threshold to 1, 4, 8, or 14 characters. The default is 0 (trigger disabled).
-u number
Append number to the device name prefix (/dev/ser). The default is 1; additional devices are given increasing numbers.
port
The hex I/O address (for x86 systems) or the physical memory address (for PowerPC and MIPS) of a serial port.
shift
The spacing of the device registers as a power of 2. For example:
0
Registers are 1 byte apart.
1
Registers are 2 bytes apart.
2
Registers are 4 bytes apart.

n
Registers are 2n bytes apart.

The default shift is 0.

intr
The interrupt used by this port; specified in hex if prefixed with 0x, otherwise it's decimal.

Description:

The devc-ser8250 manager is a small serial device manager for QNX Neutrino. It can support any number of serial ports using 8250s, 14450s or 16550s. Each device can be assigned its own interrupt, or share an interrupt if the hardware supports interrupt sharing. If you don't specify any I/O ports for devices on an x86 system, devc-ser8250 assumes you want to use the standard PC ports of COM1 (3f8,4) and COM2 (2f8,3).

The serial driver's priority floats to the priority of the client. All internal events are processed at priority 24 (inherited from the internal pulse). The event handling priority is hard coded and isn't configurable by any of the options listed. (The driver's main.c program would need modification in order to change the priority).

When the driver talks to a client application, it's running at the priority of the client. All other processing takes place either at priority 24r or at interrupt time.

Each device is given a name in the pathname space of /dev/sern, where n starts at 1 (unless changed via the -u option) and increases. If you use the default PC serial ports, this results in:

Device Port Interrupt
/dev/ser1 3f8 4
/dev/ser2 2f8 3

Note: If your application uses /dev/console, you should create a link from it to one of /dev/ser1, /dev/ser2, … by adding a line like this to the buildfile used by mkifs:
[type=link] /dev/console = /dev/ser1

All devices are fully interrupt driven and by default support standard hardware flow control on input and output (RTS/CTS). This can be disabled by the -F option.


Note: Hardware flow control is not supported in edited mode.

A read request by default returns when at least 1 character is available. To increase efficiency, you can control three parameters to control when a read is satisfied:

Time
Return after a specified amount of time has elapsed.
Min
Return when this number of characters are in the input buffer.
Char
Return if this forwarding character is in the input buffer.

Note: If the Min value is greater than the size of the input buffer, the Min value is clipped to the size of the buffer. To avoid this, the size of the input buffer can be changed with the -I option.

These parameters are set using library routines (see tcgetattr(), tcsetattr(), readcond() and TimerTimeout() in the Library Reference).

The devc-ser8250 manager supports both raw and edited modes, making it a real tty device.

The following fields and flags are supported in the termios structure:

Field Supported flags
c_cc All characters
c_iflag BRKINT ICRNL IGNBRK IXON
c_oflag OPOST
c_cflag CLOCAL CSIZE CSTOPB PARENB PARODD
c_lflag ECHO ECHOE ECHOK ECHONL ICANON IEXTEN ISIG NOFLSH

Examples:

Start devc-ser8250, defaulting for COM1 and COM2:

devc-ser8250 &

Start devc-ser8250, defaulting for COM1 and COM2, but change baud rate to 38400 from 57600 default:

devc-ser8250 -b 38400 &

Start devc-ser8250 with five ports (the last four preset to 38400 baud):

devc-ser8250 3f8,4 -b 38400 280,3 288,3 290,3 298,3 &

You can specify multiple -F and -f options; they're position-dependent, and affect the next serial port:

devc-ser8250 -F 3f8,4 -f 2f8,3 &

Start devc-ser8250 on an NEC 4111 eval board (MIPS):

devc-ser8250 0x1600ffc0^1,0x80010007 &

See also:

devc-*

Connecting Hardware in the Neutrino User's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/d/devc-ser8250.html on line 488

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/d/devc-ser8250.html on line 488