[Previous] [Contents] [Index] [Next]

devc-sersci

Serial driver for Hitachi 7750/7751 SCI and SCIF ports


Note: You must be root to start this driver.

Syntax:

devc-sersci [options] sci|scif|sh7760scif#  [[options] sci|scif|sh7760scif#] &


Note: For sh7760scif# the # can be 0, 1, or 2.

Runs on:

SH4 Renesas 7750/7751

Options:

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

-b number
The initial baud rate (default 38400).
-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 33333333/16) is suitable for 200MHz SH4 boards.
-E
Start in raw mode (the default). Software flow control is disabled by default.
-e
Start in edit 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.
-h
Enable RS-232 use of RTS and CTS lines (default).
-H
Permanently disable RS-232 use of RTS and CTS lines. When RS-232 is disabled, the RTS and CTS lines can be used as GPIO lines.
Note: The -H option only works when the -F option to disable HW flow control is set.

-I number
The size of the raw input buffer in bytes (default 2048).
-O number
The size of the interrupt output buffer in bytes (default 2048).
-r number
Set the RTS trigger level. (SH7760 only; default 16).
-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 tx_number[,rx_number]
Enable the transmit and (optionally) receive FIFOs and set the thresholds, in characters. The tx_number argument must be 1, 2, 4, or 8; if specified, rx_number must be 1, 4, 8, or 14. The default is 1 character.
-u number
Append number to the device name prefix (/dev/ser). The default is 1; additional devices are given increasing numbers.
sci|scif
The port to use. You must specify at least one port; you can't specify the same port twice on the command line.

Description:

The devc-sersci driver is a small serial device driver for the Renenas 7750/7751 Serial Communications Interface (SCI) and Serial Communications Interface with builtin FIFO registers (SCIF) serial ports.

This driver can support the SCI and/or SCIF ports. The driver initializes itself with the appropriate interrupts.

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. The assignments of names to ports depends on the order in which you specify the ports on the command line.


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 hardware flow control on input and output (RTS/CTS). This can be disabled by the -F option.


Note: Hardware flow control isn't supported in edit mode.

For input hardware flow control, when the SCIF chipset asserts the RTS line (to signal the transmitting device to stop sending characters), the chipset assumes that the transmitting device responds within one character. If more than one character is transmitted after the SCIF chip asserts the RTS line, the extra characters are lost.


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-sersci 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-sersci for the SCIF and SCI ports, specifying a baud rate of 57600 and using edit mode. The SCIF port is assigned /dev/ser1, and the SCI port is assigned /dev/ser2:

devc-sersci -b57600 -e scif sci &

See also:

Character I/O drivers (devc-*) in the Utilities Summary


[Previous] [Contents] [Index] [Next]