TCP866-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. 8 Channel Serial PMC Version 1.0.x. Issue 1.

Similar documents
TPMC860-SW-82. Linux Device Driver. 4 Channel Isolated Serial Interface RS232 Version 1.4.x. User Manual. Issue 1.4.

TPMC917-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. 4 MB SRAM with Battery Backup and 4 Channel Serial Interface Version 1.0.

TDRV002-SW-82. Linux Device Driver. Multi-Channel Serial Interface Version 1.8.x. User Manual. Issue November 2017

The Embedded I/O Company TIP700-SW-82 Linux Device Driver User Manual TEWS TECHNOLOGIES GmbH TEWS TECHNOLOGIES LLC

TPMC680-SW-82. Linux Device Driver. 64 Digital Input/Output Version 1.1.x. User Manual. Issue April 2010

TPMC901-SW-95. QNX4 - Neutrino Device Driver. User Manual. The Embedded I/O Company. 6/4/2 Channel Extended CAN-Bus PMC

TIP675-SW-82. Linux Device Driver. 48 TTL I/O Lines with Interrupts Version 1.2.x. User Manual. Issue November 2013

TPMC500-SW-42. VxWorks Device Driver. User Manual. The Embedded I/O Company. 32 Channel 12 Bit ADC. Version 2.0.x. Issue 2.0.

TIP866-SW-95. QNX-Neutrino Device Driver. 8 Channel Serial Interface IP. Version 2.1.x. User Manual. Issue October 2009

TDRV011-SW-82. Linux Device Driver. Extended CAN Bus Version 1.0.x. User Manual. Issue April 2018

TPMC810-SW-82. Linux Device Driver. User Manual. The Embedded I/O Company. Isolated 2x CAN Bus Version 1.2.x. Issue 1.2.

TPMC821-SW-42. VxWorks Device Driver. User Manual. The Embedded I/O Company. INTERBUS Master G4 PMC. Version 1.4. Issue 1.

TDRV006-SW-42. VxWorks Device Driver. 64 Digital Inputs/Outputs (Bit I/O) Version 4.0.x. User Manual. Issue December 2017

TIP114-SW-72. LynxOS Device Driver. User Manual. The Embedded I/O Company. 10 Channel Absolute Encoder Interface (SSI) Version 1.0.

TPMC868-SW-42. VxWorks Device Driver. 16 Channel Serial PMC. Version 2.1.x. User Manual. Issue December 2011

TPMC815-SW-72. LynxOS Device Driver. User Manual. The Embedded I/O Company. ARCNET Controller. Version 1.0.x. Issue 1.0 May 2004

TIP700-SW-42. VxWorks Device Driver. User Manual. The Embedded I/O Company. Digital Output 24V DC. Version 2.0.x. Issue June 2008.

CARRIER-SW-82. Linux Device Driver. IPAC Carrier Version 2.2.x. User Manual. Issue November 2017

TDRV010-SW-95. QNX6 - Neutrino Device Driver. Isolated 2x CAN Bus. Version 1.0.x. User Manual. Issue September 2016

TCP Channel Serial Interface RS232 / RS422 cpci Module. User Manual. The Embedded I/O Company. Version 1.0. Issue 1.

TPMC Channel Isolated Serial Interface RS422/RS485. Version 1.0. User Manual. Issue July 2009

TIP570-SW-95 QNX-Neutrino Device Driver TIP570 16/8 Channel 12 Bit ADC and 8 Channel 12 Bit DAC on SBS PCI40 Carrier

TIP670-SW-95. QNX-Neutrino Device Driver. User Manual. The Embedded I/O Company. Digital I/O. Version 1.0.x. Issue August 2008.

TPMC Channel Motion Control. User Manual. The Embedded I/O Company. Version 1.0. Issue 1.3 March 2003 D

TPMC815 ARCNET PMC. User Manual. The Embedded I/O Company. Version 2.0. Issue 1.2 November 2002 D

TPMC Channel Isolated Serial Interface RS232. Version 1.0. User Manual. Issue August 2017

TPMC Channel Serial Interface RS232/RS422. Version 1.0. User Manual. Issue August 2014

Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment

TCP Channel Serial Interface RS232/RS422. Version 1.0. User Manual. Issue August 2014

TPMC550-SW-12 OS-9 for PPC Device Driver 8 (4) Channels Isolated 12-bit D/A

TIP610-SW-95 QNX-Neutrino Device Driver TIP610 16/20 Channel Digital I/O on SBS PCI40 Carrier

TXMC885. Four Channel 10/100/1000 Mbit/s Ethernet Adapter. Version 1.0. User Manual. Issue October 2011

TPMC851-SW-42. VxWorks Device Driver. Multifunction I/O (16 bit ADC/DAC, TTL I/O, Counter) Version 2.0.x. User Manual. Issue 2.0.

TPMC810. Isolated 2x CAN Bus. Version 1.1. User Manual. Issue June 2009

TPMC310. Conduction Cooled PMC Isolated 2 x CAN Bus. Version 1.1. User Manual. Issue June 2014

TIP SERCOS IP with 2 Encoder Interfaces. User Manual. The Embedded I/O Company. Version 1.0. Issue 1.3 September 2006 D

TPMC x ADC, 16x/0x DAC and 8x Digital I/O. Version 1.0. User Manual. Issue May 2018

TPMC816. Two Independent Channels Extended CAN Bus PMC Module. Version 2.2. User Manual. Issue August 2014

TPMC Channel Serial Interface RS232/RS422. Version 1.0. User Manual. Issue August 2014

TIP120-SW-42. VxWorks Device Driver. Motion Controller with Incremental Encoder Interface. Version 2.1.x. User Manual. Issue 2.1.

TIP550. Optically Isolated 8/4 Channel 12-bit D/A. Version 1.2. User Manual. Issue October 2009

TIP111. Motion Controller with Absolute Encoder Interface (SSI) User Manual. The Embedded I/O Company. Version 1.1. Issue 1.4 September 2005 D

TIP120. Motion Controller with Incremental Encoder Interface. Version 1.0. User Manual. Issue August 2014

TPMC Digital Inputs/Outputs (Bit I/O) Version 2.0. User Manual. Issue February 2014

TPCE260. PCI Express PMC Carrier. Version 1.0. User Manual. Issue August 2014

PCI, PCIe, cpci, and PC104+ Plus Modules

Introduction to Linux

OPTO32A 24 Input Bit, 8 Output Bit Optical Isolator Board

TPMC /8 Digital Inputs (24V) 16/8 Digital Outputs (24V, 0.5A) Version 3.0. User Manual. Issue June 2014

DYNAMIC ENGINEERING 150 DuBois St. Suite C, Santa Cruz, CA Fax Est.

spwr_base & spwr_chan

I/O and Device Drivers

QUICK MANUAL. Kontron Embedded Linux Image for Micro Client II and MediClient with ETXPM

PCL-740 Serial Communication RS-232/422/485/Current-Loop Interface Card

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Celeron EPIC Computer with GUI and Dual Ethernet SBC4685

TIP815. ARCNET Controller. Version 1.0. User Manual. Issue September 2009

PCI Express 4-Port Industrial Serial I/O Cards

CARRIER-SW-42. VxWorks Device Driver. IPAC Carrier. Version 4.2.x. User Manual. Issue July 2018

COSC Operating Systems Design, Fall Lecture Note: Unnamed Pipe and Shared Memory. Unnamed Pipes

Installation Guide of Hi-Speed USB to Octal RS-232/422/485 Adapter

sllin TTY discipline for UART-LIN device implementation P. Píša, R. Lisový, M. Sojka Czech Technical University in Prague DRAFT

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

Introduction to Linux

Xtreme/104. PC/104 Serial Communications. User Manual

8 Port USB to RS- 232/422/485 Octal Adapter. Product Manual. Coolgear, Inc. Version 1.1 April 2018 Model Number: USB-8COMi-RM.

DIO-BM(PCI/C-PCI)Linux/RT GPH-2X72C. Bus Master Digital Input/Output Board Driver Software for Linux/RTLinux. Help for Linux.

Comp 204: Computer Systems and Their Implementation. Lecture 18: Devices

Pipes and FIFOs. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

ICS-121. VxWORKS DEVICE DRIVER MANUAL

USB-COMi-TB USB to Industrial Single RS-422 / 485 Adapter Manual. Specifications and Features

Devices. Today. Comp 104: Operating Systems Concepts. Operating System An Abstract View 05/01/2017. Devices. Devices

Korenix JetCard Series Multiport Serial Card/Ethernet Switch Card User s Manual

PCIe-400 USER S MANUAL

PCIeBiSerial-L3com1 One-Channel Half Duplex Interface

USB-16COMi-M 16-Port RS-422/485 USB Serial Adapter User Manual. Features and Specifications. Power Supply

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

MultiCom/MV 1.0. Comtrol RocketPort Guide. Copyright , Viewpoint Systems, Inc. All Rights Reserved

RocketRAID 2522 SATA Controller Ubuntu Linux Installation Guide

Contents. PA1 review and introduction to PA2. IPC (Inter-Process Communication) Exercise. I/O redirection Pipes FIFOs

DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est

User Manual VScom PCI Cards VScom Industrial Card

User Manual USB-COM ECO

Introduction to Linux

EPIC board ensures reliability in the toughest environment

I/O. Disclaimer: some slides are adopted from book authors slides with permission 1

PROCESSES. Jo, Heeseung

Processes. Jo, Heeseung

TPMC500. Optically Isolated 32 Channel 12 Bit ADC. Version 1.1. User Manual. Issue January 2014

AMIBIOS8 Check Point and Beep Code List

Introduction & Specifications of Hi-Speed USB to Serial Adapters

Advanced 486/586 PC/104 Embedded PC SBC1491

MCS9865 Linux Driver User Manual

PRODUCT OVERVIEW ISSUE 4

Outline. OS Interface to Devices. System Input/Output. CSCI 4061 Introduction to Operating Systems. System I/O and Files. Instructor: Abhishek Chandra

This 4-port RS-422/485 Adapter is provided with an external switching power adapter in the package.

Modulo L Series - P100/120/133 L

Internet of Things: Using MRAA to Abstract Platform I/O Capabilities

Roadmap. CPU management. Memory management. Disk management. Other topics. Process, thread, synchronization, scheduling. Virtual memory, demand paging

24DSI32 24DSI12 24-bit, 32 Channel Delta-Sigma A/D Boards

Transcription:

The Embedded I/O Company TCP866-SW-82 Linux Device Driver 8 Channel Serial PMC Version 1.0.x User Manual Issue 1.0 December 2003 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek / Germany Phone: +49-(0)4101-4058-0 Fax: +49-(0)4101-4058-19 e-mail: info@tews.com www.tews.com TEWS TECHNOLOGIES LLC 1 E. Liberty Street, Sixth Floor Reno, Nevada 89504 / USA Phone: +1 (775) 686 6077 Fax: +1 (775) 686 6024 e-mail: usasales@tews.com www.tews.com

TCP866-SW-82 8 Channel Serial PMC Linux Device Driver This document contains information, which is proprietary to TEWS TECHNOLOGIES GmbH. Any reproduction without written permission is forbidden. TEWS TECHNOLOGIES GmbH has made any effort to ensure that this manual is accurate and complete. However TEWS TECHNOLOGIES GmbH reserves the right to change the product described in this document at any time without notice. TEWS TECHNOLOGIES GmbH is not liable for any damage arising out of the application or use of the device described herein. 2003 by TEWS TECHNOLOGIES GmbH Issue Description Date 1.0 First Issue February 10, 2000 TPMC866-SW-82 - Linux Device Driver Page 2 of 11

Table of Contents 1 INTRODUCTION... 4 2 INSTALLATION... 5 2.1 Build and install the device driver...5 2.2 Uninstall the device driver...5 2.3 Install device driver into the running kernel...6 2.4 Remove device driver from the running kernel...6 2.5 Change Major Device Number...7 2.6 FIFO Configuration...8 3 DEVICE DRIVER PROGRAMMING... 9 3.1 Simple Programming example...9 4 DIAGNOSTIC... 10 TPMC866-SW-82 - Linux Device Driver Page 3 of 11

1 Introduction The TCP866-SW-82 Linux device driver is a full-duplex serial driver which allows the operation of a TCP866 serial PMC on Linux operating systems with Intel and Intel-compatible x86 CPU. The TCP866-SW-82 device driver based on the standard Linux serial device driver and supports all standard terminal functions (TERMIOS). Supported features:! Extended baudrates up to 460,8 kbaud.! Each channel has a 64 Byte transmit and receive FIFO! Programmable trigger level for transmit and receive FIFO.! Hardware (RTS/CTS) and software flow control (XON/XOFF) direct controlled by the serial controller. The advantage of this feature is that the transmission of characters will immediately stop as soon as a complete character is transmitted and not when the transmit FIFO is empty for handshake under software control. This will greatly improve flow control reliability.! Direct support of different physical interfaces (RS-232, RS-422, RS-485 half-duplex and fullduplex).! Designed as Linux kernel module with dynamically loading.! Supports shared IRQ s.! Automatic configuration on startup, i.e. driver scans the entire PCI bus and initializes all found TCP866 modules.! Creates a TTY device ttytcp and dialout device cuatcp with dynamically allocated or fixed major device numbers. TPMC866-SW-82 - Linux Device Driver Page 4 of 11

2 Installation The software is delivered on a PC formatted 3½" HD diskette. The directory A:\TCP866-SW-82 contains the following files: TCP866-SW-82.pdf TCP866-SW-82.tar.gz This manual in PDF format GZIP compressed archive with driver source code The GZIP compressed archive TCP866-SW-82.tar.gz contains the following files and directories: tcp866.c tcp866.h load866 unload866 makefile tcp866-sw-82.pdf example/test866.c example/setspeed.c Driver source code Driver header file Script for driver loading Script for driver unloading Device driver make file This Manual in PDF format Simple driver test program (only example code) Baudrate setup utility (only example code) In order to perform an installation, extract all files of the archive TCP866-SW-82.tar.gz to the desired target directory. 2.1 Build and install the device driver Login as root Change to the target directory To create and install the driver in the module directory /lib/modules/<version>/misc enter: # make install Some Linux distributions and kernel versions requires modification of the Makefile. If you got errors during compilation or installation of the driver please verify the macros VER and INCLUDEDIR in the Makefile. 2.2 Uninstall the device driver Login as root Change to the target directory To remove the driver from the module directory /lib/modules/<version>/misc enter: # make uninstall TPMC866-SW-82 - Linux Device Driver Page 5 of 11

2.3 Install device driver into the running kernel To insert the driver into the running kernel login as root and execute the shell script load866. # sh load866 This shell script removes a previously installed TCP866 driver, installs the new one into the kernel and creates nodes for all 8 channels of a TCP866. Created tty device nodes are: /dev/ttytcp0, /dev/ttytcp1,..., /dev/ttytcp7 Created cua device nodes are: /dev/cuatcp0, /dev/cuatcp1,..., /dev/cuatcp7 The unmodified driver use dynamic allocation of major device numbers. To get the current used major number the script extracts the major number for the TTY and CUA driver from /proc/devices to create the correct device nodes. 2.4 Remove device driver from the running kernel To remove the driver from the running kernel login as root and execute the shell script unload866. # sh unload866 TPMC866-SW-82 - Linux Device Driver Page 6 of 11

2.5 Change Major Device Number The released TPCM866 driver use dynamic allocation of major device numbers. If this isn t suitable for the application it s possible to define a major number separately for the TTY and CUA driver. To change the major number edit the file tcp866.c, change the following symbols to appropriate values and enter make install to create a new driver. TCP866_TTY_MAJOR TCP866_CUA_MAJOR Defines the value for the terminal device. Valid numbers are in range between 0 and 255. A value of 0 means dynamic number allocation. Defines the value for the dialout device. Valid numbers are in range between 0 and 255. A value of 0 means dynamic number allocation. Example: #define TCP866_TTY_MAJOR 122 #define TCP866_CUA_MAJOR 123 Be sure that the desired major number isn t used by other drivers. Please check /proc/devices to see which numbers are free. Keep in mind that s necessary to create new device nodes if the major number for the TCP866 driver has changed and the load866 script isn t used. TPMC866-SW-82 - Linux Device Driver Page 7 of 11

2.6 FIFO Configuration After installation of the TCP866 Device Driver the trigger level for transmit and receive FIFO are set to their default values. Default values are: Receive FIFO Transmit FIFO 56 8 The configuration of the FIFO trigger level is used for all TCP866 devices in common. To change the trigger levels edit the file tcp866.c, change the following symbols to appropriate values and enter make install to create a new driver. TCP866_RX_TRG_DEF TCP866_TX_TRG_DEF Defines the trigger level for the receiver FIFO. Valid trigger levels are: UART_FCR_R_TRIGGER_8 UART_FCR_R_TRIGGER_16 UART_FCR_R_TRIGGER_56 UART_FCR_R_TRIGGER_60 Defines the trigger level for the transmitter FIFO. Valid trigger levels are: UART_FCR_T_TRIGGER_8 UART_FCR_T_TRIGGER_16 UART_FCR_T_TRIGGER_32 UART_FCR_T_TRIGGER_56 Please refer to the User Manual of the ST16C654 controller to get more information how to customize suitable FIFO trigger level. TPMC866-SW-82 - Linux Device Driver Page 8 of 11

3 Device Driver Programming The TCP866-SW-82 driver loosely based on the standard Linux terminal driver. Due to this way of implementation the driver interface and functionality is compatible to the standard Linux terminal driver. Please refer to the TERMIOS man page and driver programming related man pages for more information about serial driver programming. 3.1 Simple Programming example This example program opens the first serial channel of a TCP866 for read/write. After the device is open it writes a Hello World string to the device and receives up 80 bytes from the serial channel. main() { int fd; int count; char buffer[81]; /* open the desired TCP866 device */ fd = open( /dev/ttytcp0, O_RDWR O_NOCTTY); if (fd < 0) exit(-1); /* write data to TCP866 device */ count = write(fd, Hello World\n, 12); printf( %d bytes written\n, count); /* read up to 80 bytes from the device */ count = read(fd, buffer, 80) if (count < 0) { printf( read error\n ); } else { buffer[count] = 0; printf( %d bytes read <%s>\n, count, buffer); } } close(fd); The source files test866.c and setspeed.c contains additional programming examples. TPMC866-SW-82 - Linux Device Driver Page 9 of 11

4 Diagnostic If the TCP866 does not work properly it is helpful to get some status information from the driver respective kernel. The Linux /proc file system provides information about kernel, resources, driver, devices and so on. The following screen dumps displays information of a correct running TCP866 driver (see also the proc man pages). # cat /proc/tty/driver/tcp866 TPCM866 serial driver:1.0.0 revision:2003-12-06 0: uart:st16c654 port:d880 irq:10 tx:0 rx:0 1: uart:st16c654 port:d888 irq:10 tx:0 rx:0 2: uart:st16c654 port:d890 irq:10 tx:0 rx:0 DSR CD RI 3: uart:st16c654 port:d898 irq:10 tx:0 rx:0 DSR CD RI 4: uart:st16c654 port:d8a0 irq:10 tx:0 rx:0 DSR CD RI 5: uart:st16c654 port:d8a8 irq:10 tx:0 rx:0 DSR CD RI 6: uart:st16c654 port:d8b0 irq:10 tx:0 rx:0 DSR CD RI 7: uart:st16c654 port:d8b8 irq:10 tx:0 rx:0 DSR CD RI # cat /proc/tty/drivers tcp866 /dev/cuatcp 253 0-255 serial:callout tcp866 serial /dev/ttytcp /dev/cua 254 0-255 serial 5 64-127 serial:callout serial /dev/ttys 4 64-127 serial pty_slave pty_master /dev/pts /dev/ptm 143 135 0-255 pty:slave 0-255 pty:master pty_slave /dev/ttyp 3 0-255 pty:slave pty_master /dev/vc/0 /dev/pty /dev/vc/0 2 4 0-255 pty:master 0 system:vtmaster /dev/ptmx /dev/ptmx 5 2 system /dev/console /dev/tty /dev/console /dev/tty 5 5 1 system:console 0 system:/dev/tty unknown /dev/vc/%d 4 1-63 console # cat /proc/interrupts CPU0 0: 60612 XT-PIC timer 1: 893 XT-PIC keyboard 2: 5: 0 0 XT-PIC cascade XT-PIC usb-uhci 8: 1 XT-PIC rtc 10: 11: 30 277 XT-PIC sym53c8xx, TCP866 XT-PIC eth0, eth1 12: 14: 1679 9917 XT-PIC PS/2 Mouse XT-PIC ide0 15: 10 XT-PIC ide1 NMI: ERR: 0 0 TPMC866-SW-82 - Linux Device Driver Page 10 of 11

# cat /proc/ioports 0000-001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0070-007f : rtc 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0 02e8-02ef : serial(auto) 02f8-02ff : serial(auto) 0376-0376 : ide1 0378-037a : parport0 03c0-03df : vga+ 03f6-03f6 : ide0 0400-043f : Intel Corp. 82371AB/EB/MB PIIX4 ACPI 0440-045f : Intel Corp. 82371AB/EB/MB PIIX4 ACPI 0cf8-0cff : PCI conf1 c000-cfff : PCI Bus #01 d000-dfff : PCI Bus #02 d880-d8ff : PCI device 1498:2362 (TEWS Datentechnik GmBH) d880-d8c9 : TCP866 (PCI) dc00-dc7f : PCI device 1498:2362 (TEWS Datentechnik GmBH) e800-e8ff : LSI Logic / Symbios Logic (formerly NCR) 53c875 e800-e87f : sym53c8xx ee80-eebf : Intel Corp. 82559ER (#2) ee80-eebf : e100 ef00-ef3f : Intel Corp. 82559ER ef00-ef3f : e100 ef80-ef9f : Intel Corp. 82371AB/EB/MB PIIX4 USB ef80-ef9f : usb-uhci ffa0-ffaf : Intel Corp. 82371AB/EB/MB PIIX4 IDE ffa0-ffa7 : ide0 ffa8-ffaf : ide1 TPMC866-SW-82 - Linux Device Driver Page 11 of 11