Introduction
This software installation guide is designed to help users successfully install the Intellicon-NT960 ISA serial adapter under the QNX 4.XX platform. Before beginning the software installation, please be sure to read the product manual that came with the Intellicon adapter for hardware installation/configuration instructions. To make the instructions easy to follow, all commands that have to be issued on the command line are written in bold text. NOTE: You must be logged in as root to perform this installation.
Preamble: Getting Your System Ready
Before you begin the installation process, you will need to have two applications running so you will be able to read from the DOS diskette. To run these applications, enter the following two commands from the command line:
# Dofsys &
# Fsys.floppy &
These particular applications may be running by default (these are QNX applications), and therefore you may not have to issue the previous commands. Please see the QNX documentation for more details about Dofsys and Fsys.floppy.
There are two drivers supplied on the Intellicon-NT960 QNX 4.XX driver diskette, Dev.nt960 (for QNX 4.22 or earlier) and Dev32.nt960 (for QNX 4.23 or later). These administrators provide the standard interface between QNX 4.XX and the serial ports. When the Dev.nt960 or Dev32.nt960 administrator begins execution, it initializes the hardware then boots the i960 processor on the Host Adapter. This operation is not lengthy but usually takes a second. For QNX Version 4.XX it is advisable that you place a sleep 3 command in your sysinit.# file (where # is the node number for your system) following the Dev.nt960 or Dev32.nt960 command. This will allow the driver time to initialize. If you do not place the sleep 3 command the Intellicon-NT960 serial ports will most likely generate Invalid Device messages because the driver has not fully completed its initialization process.
Installation of the Serial Driver
Technical Tip:
When you install the NT960 subsystem for the FIRST time, you MUST run from QNX the ntload program with the HEX file fqniu.hex
# ./ntload f=fqniu
You run this BEFORE installation of the NT960 QNX 4.XX device driver. You will find the ntload program in the /usr/cti/nt960 directory. Please refer to the ntload program in section 8
To install the NT960 QNX 4.XX device driver follow these procedures:
Type the following command once the driver has been downloaded:
# install –u /dos/a/qnx4
This command will create the subdirectory /cti/nt960 in your /usr directory, and copy the Intellicon-NT960 QNX4.XX device driver files to that directory.
Add the following entry to your sysinit.# file:
Dev.nt960 [port],[irq] [options] &
or
Dev32.nt960 [port],[irq] [options] &
Where:
[port] are the I/O port addresses (default: 300 – 303)
[irq] is the Interrupt Request Line (default: 10)
[options] are:
- -a number: Base address (in hex) of shared memory (default: d0000).
- -b number: Define initial baud rate (default: 9600).
- -C number: Size of canonical input buffer (default: 256).
- -d: Set DTR on initially.
- -D: Set DTR off initially.
- -e: Set options to “edit” mode.
- -E: Set options to “raw” mode.
- -f: Enable hardware flow control (default).
- -F: Disable hardware flow control.
- -h number: Define high-water mark for input flow control (default: 3/4 point of input buffer).
- -I number: Size of raw input buffer (default: 2048).
- -l number: Define low-water mark for input flow control (default: 1/4 point of input buffer).
- -m: Disable modem carrier processing (HUP).
- -M: Enable modem processing (HUP).
- -N name: Prefix to register (default: “nt”).
- -O number: Size of output buffer (default: 2048).
- -q: Enable polled mode (no IRQ’s)
- -p number: Set port number for subsequent options.
- -r: Set RTS on initially.
- -R: Set RTS off initially.
- -x: Enables software flow control
- -X; Disables software flow control (default)
- -y name: Use name to register a NT960 driver . This allows you to run more than one NT960 Host adapter in a system.
**** NOTE THE DRIVER WILL NOT LOAD IF YOUR ACM DEVICES ARE NOT CONNECTED PROPERLY *****
Example 1: Dev.nt960 &
Where:
memory = d0000 (default)
I/O port addresses 300-303 (default)
IRQ 10 (default)
Example 2: Dev.nt960 -a e0000 &
Where:
memory = e0000
Example 3: Dev.nt960 300,10 -N /dev/tty &
Where:
memory = d0000 (default)
I/O port addresses 300-303
IRQ 10
Register as name tty
When there are already two serial ports in the system (ports 1 & 2) the naming convention will start at port 3( tty3 ).
Example 4: Dev.nt960 -p 1 -b 9600 -E -p 4 -b 1200 -e &
Where:
memory = d0000 (default)
I/O port addresses 300-303 (default)
IRQ 10 (default)
Baud rate (ports 1 through 3) 9600
Set options (ports1 through 3) raw mode
Baud rate (ports 4 through n) 1200
Set options (ports 4 through n) edit mode
Note: Other parameters retain their default values
All examples listed for Dev.nt960 apply to Dev32.nt960, but you must substitute Dev32.nt960 for Dev.nt960 in this example
Example 5: Dev.nt960 340 -q &
This statement configures the NT960 Host Adapter for polled mode.
Where:
memory = d0000 (default)
I/O port addresses 340-343
IRQ no IRQ (in polled mode)
Note: Other parameters retain their default values
All examples listed for Dev.nt960 apply to Dev32.nt960, but you must substitute Dev32.nt960 for Dev.nt960 in this example.
Enhanced Features
When the firmware is executing on the Intellicon-NT960 board, you may invoke additional data processing and line control features for each individual serial line. These features are usually queried and set by the ctty program. Syntax for the ctty statement is:
# ctty [options]* [<device]
Where [options] are:
- +/-rts: turn on or off the Auto RTS feature (see the Auto RTS section below).
- +/-polarity: turn on or off +/-polarity option. With this you can program the “polarity” of the RTS signal in the Auto RTS feature. The default is +polarity (see the Auto RTS section below).
- +/-rxd: turns on or off the receiver discard. This option is for use with RS-485 two wire half duplex communications. The default is receiver on (see the Auto RTS section below).
Auto RTS
The Auto RTS feature allows you to assert the RTS signal when there is data to be transmitted. After the last stop bit of the last byte has been transmitted, RTS will be dropped allowing other devices access to the switched line. This feature is very useful when doing half duplex or multi-drop RS-422/485 communications.
Example:
To turn on Auto RTS processing for a port, use the following statement:
# ctty +rts </dev/nt1
To turn off Auto RTS processing for a port, use the following statement:
# ctty -rts </dev/nt1
You can program the “polarity” of the RTS signal in the Auto RTS feature with the +/-polarity option. With +polarity set you will assert the RTS line during the transmission of data. With -polarity set you will assert the RTS line when no data is transmitted. The default is +polarity.
Example:
To set the RTS line low during data transmission, use the following statement:
# ctty + rts -polarity </dev/cti1
To set the RTS line high during data transmission, use the following statement:
# ctty +rts +polarity </dev/cti1
You can also turn on or off the “receiver discard” of the RTS signal in the Auto RTS feature with the +/- rxd option. This option disables the receiver whenever the transmitter is active. This prevents character echo when using half duplex RS-485 communications.
Example:
To turn on the auto RTS and receiver discard option, use the following statement:
ctty +rts +rxd </dev/cti1
For more information on using the various options of the Auto RTS feature, please refer to the README file on the Intellicon-NT960 QNX 4.XX driver diskette.
Utilities
NTMON
NTMON is a software utility which monitors all the NT960 serial ports. NTMON obtains information about the ports from the driver every second and updates this information only when the state of a port changes. You can also run NTMON from a remote computer. For more information on the use of NTMON, please refer to the README file on the Intellicon-NT960 QNX 4.XX driver diskette.
rxt
rxt is a software utility that allows you to alter the receive and transmit parameters of the CL-CD1400 UARTs on the ACM/16 or ACM/Flex16. For more information on the use of rxt, please refer to the README file on the Intellicon-NT960 QNX 4.XX driver diskette.
Technical Tip:
You should only use the rxt utility if timing is critical (i.e., a polling application where a program waits for an event to occur in a fixed time period. Otherwise the default setting should be adequate.
We provide the function cti_tcdrain() because the tcdrain() function supplied by QSSL does not work with NT960 QNX 4.XX device drivers.
The reason that tcdrain() does not work is that it expects the UART device to have a transmit FIFO of one byte. Therefore when the buffer between Dev and Dev.nt960 or Dev32.nt960 is empty, tcdrain() assumes the transmission of all bytes of data. However, it is possible that the Intellicon-NT960 can have several kilobytes of data in its buffers and tcdrain() will indicate that all data has transmitted. To avoid this situation cti_tcdrain() will operate like tcdrain() except that it will not return until all the data in the buffers has transmitted. You use cti_tcdrain() in conjunction with tcdrain(), thus ensuring that the operating system’s buffers and the NT960 buffers are empty. For more information on the use of cti_tcdrain, please refer to the README file on the Intellicon-NT960 QNX 4.XX driver diskette.
Example:
The following is an example of cti_tcdrain():
Int fd;
fd = open(“/dev/nt1”, O_RDWR);
write( fd, “ATH”);
tcdrain( fd );
cti_tcdrain( fd );
When tcdrain() returns, Dev’s buffers have emptied to the NT960 adapter. When cti_tcdrain() returns, all data buffered on the NT960 adapter has been transmitted.
Error Messages
Dev.nt960: Memory verify error on DPR.
While trying to initialize data structures in dual-ported RAM, the driver performs a small write-read-verify memory test on the DPR region. This message indicates that the test failed. In most cases, the hardware configuration does not match the command line and defaults of the driver. Please re-confirm and retry. Also check the IRQ, base memory and I/O address settings for possible conflicts with other adapters in the system. If the driver will still not start, contact Connect Tech Customer Support.
Dev.nt960: NT960 did NOT start.
Error codes: %x %x %x …
The i960 processor would not boot. Record the error codes listed and contact Connect Tech Customer Support.
Dev.nt960: NT960 did NOT complete initialization.
Error codes: %x %x %x …
The i960 processor encountered a fatal error during boot. Record the error codes listed and contact Connect Tech Customer Support.
Dev.nt960: Failed startup.
Error codes: %x %x %X …
The i960 processor encountered a fatal error during boot. Record the error codes listed and contact Connect Tech Customer Support.
Dev.nt960: Wrong firmware installed (%s)
The wrong firmware is programmed into the NT960 Flash Memory. Use the ntload program (see page 3-1 of the Software Installation chapter) to reload the correct firmware.
Dev.nt960: IRQ: Device (%d) out of range.
Record the device number then contact Connect Tech Customer Support.
Dev.nt960: IRQ: Illegal interrupt reason (%d).
Record the interrupt reason and contact Connect Tech Customer Support.
Dev.nt960: Driver already running.
There is already a copy of Dev.nt960 running on this node. If you wish you can use the -y parameter to add a second NT960 driver.
Dev.nt960: Bad I/O Port (%s)
An invalid I/O port has been specified OR an invalid command line switch has been interpreted as an I/O port. Check the accuracy of the command line parameters and retry.
Dev.nt960: Bad IRQ Number (%s)
An invalid IRQ number has been specified OR an invalid command line switch has been interpreted as an IRQ number. Check the accuracy of the command line parameters and retry.
Dev.nt960: No devices available.
This message is always preceded by another error message. Please refer to the action on the other error message.
Dev.nt960: System unable to add new devices.
Dev failure. Contact Connect Tech Customer Support.
Dev.nt960: Error mount a new device.
Dev failure. Contact Connect Tech Customer Support.
Dev.nt960: Error arming a new device.
Dev failure. Contact Connect Tech Customer Support.
Dev.nt960: HS: Wait failed P (%d) R (%d)
Internal driver/hardware failure. Contact Connect Tech Customer Support.
Using ntload
ntload Program
The NT960 ntload program is a conversion program that reads an Intel style HEX file and then writes it to the NT960 Host Adapter’s flash memory as a binary file. The binary file will have the same name as the HEX file but with a .bin extension on it.
To run the ntload program for a UNIX system, you must run the ntload program for DOS (found on the Intellicon-NT960 DOS driver diskette).
The ntload program runs under Dos 5.0 or higher in a system with 512K memory or greater. Other versions of the ntload program run under QNX 2.XX, QNX 4.XX and Windows NT. You can find the appropriate ntload program on the Intellicon-NT960 DOS, QNX and Windows NT driver diskettes.
The command line syntax for the ntload program is:
# ntload [f=hexname[.hex]] [a=addr] [p=io_port] [+f] [+v]
Where [ ] is:
- f= This parameter specifies the firmware HEX file that will load into the NT960 Flash memory. You must specify this parameter.(f= has no default)
- a= This specifies the memory address configuration of the NT960. Refer to the hardware installation section for the setting of SW2 (a=d000h by default)
- e=sec Sets the erase timeout value (in seconds)
- p= This specifies the I/O address configuration of the NT960. Refer to the hardware installation section for the setting of SW1 (p=300h by default)
- +f: Forces the conversion of the ‘.hex’ file to occur even if the ‘.bin’ file is up to date (off by default)
- +P: Forces flash programming even if erasure does not complete
- +v: Displays the version of the HEX load file and then stops.
If the .bin file already exists then the date/time of the .bin file is compared to the date/time of the .hex file. If the .hex file is newer than the .bin file then the conversion will take place. If not then a message on your screen indicates that the .bin file is up to date. You can force the conversion of the HEX file by the use of the +f argument.
Examples:
- The following example loads the HEX file fqniu.hex information into the Host Adapters flash memory
ntload f=fqniu
- The following example loads the HEX file fsniu.hex information into the Host Adapters flash memory and forces HEX to binary conversion.
ntload f=fsniu +f
- The following example loads the HEX file fsniu.hex information into the Host Adapter’s flash memory, where the Host Adapter has a base memory address of D200h and an I/O port address of 320h
ntload f=fsniu a=d200 p=320
- The following example will display on the screen a brief description of the ntloadarguments
ntload ?
Upon successful completion of the ntload program, the following messages will appear:
The flash memory is now programmed – NT960 initialization will begin ………………
NT960 (re) programming has been successful
New firmware is NT960 [rev #] [date] [time] [year]