Home
User Manual - powerbridge.de
Contents
1. Display channel position and Moduletype result ioctl ttyl TDRVO02_IOCQ_GET_INFO amp infoBuf if result lt 0 printf Device d d d s n infoBuf pciBusNo infoBuf pciDeviceNo infoBuf localChannelNo infoBuf typeStr if infoBuf intfProgrammable printf Interface configuration 02Xh n infoBuf intfConfig else printf Interface is not configurable n TDRV002 SW 82 Linux Device Driver Page 21 of 25 TEWS amp TECHNOLOGIES 3 2 6 TDRV002_IOCT_SET_FIFOTRIG NAME TDRV002_IOCT_SET_FIFOTRIG Configure FIFO trigger levels DESCRIPTION This ioctl function configures the FIFO trigger levels for hardware receive and transmit FIFO This allows optimizing interrupt load or data loss protection The new FIFO trigger level must be specified in structure TDRV002_SET_FIFO_STRUCT The pointer of the structure must be passed by the parameter arg to the driver typedef struct unsigned int txFifoTrig unsigned int rxFifoTrig TDRV002_SET_FIFO_STRUCT txFifoTrig This value specifies the new FIFO trigger level which specifies the number of characters left in the transmit FIFO when the controller will generate an interrupt announcing that there is space in the transmit FIFO to be filled with more data ready to be transmitted Allowed values are 0 64 for all TPMC and TCP boards and 0 255 for TXMC boards but 0 specifies to use the default value of
2. ssssssssuunnenuunnennnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnmnnn nnnnnn nnmnnn nnana 8 2 2 Uninstall the Device Driver cccsecccceeeeeeeeeeneeeeeeeneeseeesneeseeesneeseeesneeseeesneeseeesneeseeesnaeseeesnenseeesnaes 8 2 3 Install Device Driver into the running Kernel cccesseeceeeeeeeeeeeeeeeeeeeeneeseeeseeeseeeseeeseeesneeseeesnees 8 2 4 Remove Device Driver from the running Kernel cessecccceseeeseeeeeeeeeeeeneeseeeseeseeesneeseeesneeeeeesnees 9 2 5 Change Major Device NUMDEL csssccsseceeeseceeeeeeeeeeeeneeeeseaesenaeeeneeeeseaeeesaaesaseaeeeeeeeseaesaseeeenseeeees 9 3 DEVICE DRIVER PROGRAMMING csssccsiscscssstasscssssccsssetsansnasacesisacetnedsanansascuscdasssnaane 10 3 1 Setting Up Baud Rates geed Seat 10 3 2 OCU E 11 3 2 1 TIDRV002 Le e ER 13 3 2 2 TDRV002_IOCT_CONF_TRANS 00 cccccccesceceeeeecceeeeeeeeeeeeeeseaeeeseaeeeeaeeseeeeescaeeesaeeneneeee 16 3 2 3 TDRV002Z IOGT SPEED nonini aae aaa ead aa a aaa aa aai aiaa 18 3 24 TORV002 JOE GET SPEED srining aiiai aaiae daaa ai aaiae 19 3 25 TDRV002Z IOGCQ GET INFO ougegedekeeugetddfeseeddtegeetZrtesgedg tegt aaa aaa aai ae aa aE 20 3 26 TDRV002 IOCT SET FIFOTIRI Gisseccncscccieagescctsecchsneedeactiny aeaa a aa aaaea s 22 4 TDRVOO0O2CONFIG COMMAND LINE TOOL ccccccceseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 24 5 ul E Le CC 1 25 TDRV002 SW 82 Linux Device Driver Page 4 of 25 TEWS amp TECHNOLOGIES 1 Int
3. TDRV002_GET_INFO_STRUCT pciBusNo Returns the PCI bus number the UART is mounted Some TDRV002 supported modules have their own PCI bridge in this case the value is the number of the local PCI bus on the module pciParentBusNo Returns the PCI bus number of the parent PCI bus This value may be interesting if a module type with an own PCI bridge is used If there is no parent PCI bus the value will be 1 pciDeviceNo Returns the PCI device number of the UART controller This specifies a fix place on the PCI bus and may be used to identify a special module The value returns the PCI device number of the UART not that one of the TDRV002 supported module localChanneINo Returns the local channel number of the specified device The first channel on a module starts with 0 the second is 1 and so on deviceld Returns the PCI device ID this identifies the model type TDRV002 SW 82 Linux Device Driver Page 20 of 25 TEWS amp TECHNOLOGIES subSystemld Returns the PCI Subsystem ID this identifies the model variant typeSitr Returns a string with the product name e g TPMC461 12 or TCP462 10 intfProgrammable Returns TRUE 1 if the specific channel offers a programmable interface intfConfig Returns the current transceiver interface configuration For a description of this value refer to function TDRV002_IOCT_CONF_TRANS EXAMPLE include lt tdrv002user h gt int result ttyl TDRV002_GET_INFO_STRUCT infoBuf
4. TENSES The Embedded I O Company TECHNOLOGIES TDRV002 SW 82 Linux Device Driver Multi Channel Serial Interface Version 1 8 x User Manual Issue 1 8 0 March 2013 TEWS TECHNOLOGIES GmbH Am Bahnhof 7 25469 Halstenbek Germany Phone 49 0 4101 40580 Fax 49 0 4101 4058 19 e mail info tews com www tews com TDRV002 SW 82 Linux Device Driver Multi Channel Serial Interface Supported Modules TPMC371 TPMC372 TPMC375 TPMC376 TPMC377 TPMC460 TPMC461 TPMC462 TPMC463 TPMC465 TPMC466 TPMC467 TPMC470 TCP460 TCP461 TCP462 TCP463 TCP465 TCP466 TCP467 TCP469 TCP470 TXMC375 TDRV002 SW 82 Linux Device Driver TENSE TECHNOLOGIES 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 2005 2013 by TEWS TECHNOLOGIES GmbH Page 2 of 25 TEWSS amp TECHNOLOGIES Issue Description Date 1 0 0 First Issue February 21 2005 1 1 0 Built In Self Test BIST added March 11 2005 1 1 1 depmod for driver installation added
5. ioctl man pages TDRV002 SW 82 Linux Device Driver Page 12 of 25 TEWS amp TECHNOLOGIES 3 2 1 TDRVO002 IOCQ BIST NAME TDRV002_I1OCQ _BIST Start Built In Self Test DESCRIPTION The TDRV002 driver version 1 1 0 and higher supports a special IOCTL function for testing module hardware and for system diagnostic The optional argument can be omitted for this ioctl function The functionality is called Built In Self Test or BIST With BIST you can test each channel of all your modules separately There are three different test classes First is a line test second an interrupt test and the last a data integrity test All tests run with local channel loopback enabled so you don t need an external cable connection The Fig 3 1 describes the loop back configuration of an 8 channel UART so all line arrays are index with 7 0 For the two and four channel UARTs the line arrays should be indexed with 1 0 or 3 0 Transmit Shift TX 7 0 Register Receive Shift Register RX 7 0 RTS 7 0 CTS 7 0 DTR 7 0 2 o g Ka Li 5 OO Wi Kl r e D ad D 3 a o E k DSR 7 0 RI 7 0 Modem General Purpose Control Fig 3 1 TDRV002 SW 82 Linux Device Driver Page 13 of 25 TEWS amp TECHNOLOGIES The line test contains a test of all modem lines RTS CTS DTR DSR OP1 RI OP2 CD Only the static states for both electrical levels are tested on each
6. from the module directory lib modules lt version gt misc enter make uninstall 2 3 Install Device Driver into the running Kernel e To load the device driver into the running kernel login as root and execute the following commands modprobe tdrv002serialdrv e After the first build or if you are using dynamic major device allocation its necessary to create new device nodes on the file system Please execute the script file makenode which resides in serial directory to do this If your kernel has enabled the device file system devfs udev then skip running the makenod e script Instead of creating device nodes from the script the driver itself takes creating and destroying of device nodes in its responsibility sh makenode On success the device driver will create a minor device for each compatible channel found The first channel of the first PMC module can be accessed with device node dev ttySTDRV002_0 the second channel with device node dev ttySTDRV002_1 and so on The assignment of device nodes to physical PMC modules depends on the search order of the PCI bus driver TDRV002 SW 82 Linux Device Driver Page 8 of 25 TEWS amp TECHNOLOGIES 2 4 Remove Device Driver from the running Kernel e To remove the device driver from the running kernel login as root and execute the following command modprobe r tdrv002serialdrv If your kernel has enabled a device file system devfs udev all dev ttySTDR
7. sender receiver line pair For testing interrupts the BIST transmits a test buffer with known data and size All data should be received on same channel during internal loopback If not there is an interrupt error The buffer size is 1024 BYTE The baud rate has to be set through the standard terminal IOCTL functions The last test verifies received data to assert data integrity EXAMPLE include lt tdrv002user h gt int result ttyl Start Built In Selftest result ioctl ttyl TDRVO0O2_IOCQ_BIST NULL if result lt 0 printf ERRNO d s n errno strerror errno else if result gt 0 printf BIST detected a line error n if result amp TDRVOO2_ERTSCTS printf RTS CTS line broken n if result amp TDRVO02_EDTRDSR D D SR line broken n if result amp TDRVOO2_ERT printf OP1 RI line broken n if result amp TDRVOO0O2_ECD printf OP2 DCD line broken n if result amp TDRVOO02_EDATA printf DTR r ea AA d Se printf Data integrity test failed n else printf INFO Port successfully tested n TDRV002 SW 82 Linux Device Driver Page 14 of 25 TEWS amp TECHNOLOGIES RETURNS If return value is gt 0 one of three tests failed Use the following flags to get a detailed error description Return Code Description TDRV002_ERTSCTS If set RTS CTS line broken TDRV
8. 002_EDTRDSR If set DTR DSR line broken TDRV002_ERI If set OP 1 RI line broken TDRV002_ECD If set OP2 CD line broken TDRV002_EDATA Data integrity test failed No correct transmission possible ERRORS Error Code Description ETIME A timeout occurred during wait interrupts do not work correctly EAGAIN Your task should never been blocked Change it to use the Built In Self Test ERESTARTSYS Interrupted by external signal TDRV002 SW 82 Linux Device Driver Page 15 of 25 TEWS amp TECHNOLOGIES 3 2 2 TDRV002 IOCT CONF TRANS NAME TDRV002_IOCT_CONF_TRANS Configure transceiver DESCRIPTION This ioctl function configures the transceiver circuit of all TDRV002 modules with a programmable physical interface The configuration is passed by value by the parameter arg to the driver The flags below are available and should be ORed to build a configuration value Value TDRV002_CFG_RS485_RS232 TDRV002_CFG_HDPLX TDRV002_CFG_RENA TDRV002_CFG_RTERM TDRV002_CFG_TTERM TDRV002_CFG_SLEWLIMIT TDRV002_CFG_SHDN TDRV002_CFG_AUTO_RS485 Meaning Set to enable RS485 interface clear to enable RS232 interface Set to enable half duplex interface clear to enable full duplex interface Set to enable auto RS485 receiver enable feature clear to disable it Set to enable receiver termination clear to disable it Set to enable transmitter term
9. 16 Increasing the value will increase interrupt load but the possibility of gaps in data transmission while data is ready to send will be decreased Decreasing the value will decrease interrupt load but increase the risk of transmission gaps rxFifoTrig This value specifies the new FIFO trigger level which specifies the number of characters in the receive FIFO when the controller will generate an interrupt announcing that data should be read Allowed values are 0 64 for all TPMC and TCP boards and 0 255 for TXMC boards but 0 specifies to use the default value of 48 Increasing this value will decrease interrupt load but will increase the risk of data loss if hardware handshake is not used Decreasing the value will increase interrupt load but decrease the risk of data loss TDRV002 SW 82 Linux Device Driver Page 22 of 25 TEWS amp TECHNOLOGIES EXAMPLE include lt tdrv002user h gt int result ttyl TDRV002_SET_FIFO_STRUCT fifoBuf Rx FIFO trigger 32 Tx FIFO trigger 40 fifoBuf rxFifoTrig 32 fifoBuf txFifoTrig 40 result ioctl ttyl TDRVO002_IOCT_SET_FIFOTRIG if result lt 0 handle errors amp fifoBuf TDRV002 SW 82 Linux Device Driver Page 23 of 25 TEWS amp TECHNOLOGIES 4tdrv002config Command Line Tool To setup the physical interface of a certain channel you can use example tdrvOO2config for programming of the transceiver c
10. EF cat proc tty drivers dev tty dev console dev ptmx dev vc 0 dev ttySTDRV002_ 250 0 127 dev ttyUSB dev ttys dev pts dev ptm dev tty 6 tx 8192 rx 8192 6 tx 1024 rx 1024 CTS 6 tx 1024 rx 1024 CTS 6 tx 1024 rx 1024 6 tx 1024 rx 1024 6 tx 1024 rx 1024 6 tx 1024 rx 1024 FOO irq 16 tx 1024 rx 1024 5 0 system dev tty 5 1 system console 5 2 system 4 0 system vtmaster serial 188 0 253 serial 4 64 95 serial 136 0 1048575 pty slave 1 28 0 1048575 pty master 4 1 63 console 04 01 0 Serial controller TEWS Technologies GmbH Device Olcd rev 02 prog if 02 16550 Subsystem TEWS Technologies GmbH Device 000c fast devsel IRQ 16 Flags Memory Kernel Kernel TDRV002 SW 82 Linux at feb9f000 32 bit driver in use modules tdrv002 Device Driver TEWS TI ECHNOLOGI non prefetchabl e size 4K ES haldrv DRVOO2ZHAL Driver Page 25 of 25
11. October 13 2005 1 2 0 New module support and transceiver programming IOCTL added July 26 2006 ChangeLog ixt release history file added file list modified 1 2 1 New Address TEWS LLC November 7 2006 1 3 0 New IOCTL command TDRV002_IOCT_SPEED added January 10 2007 1 4 0 New IOCTL command TDRV002_IOCQ_GET_SPEED March 01 2007 New IOCTL command TDRV002_IOCQ_GET_INFO example file added to file list 1 4 1 TDRV002 device naming note added June 20 2007 Source file archive extraction command line added 1 4 2 File list changed include path moved September 26 2007 1 4 3 Address TEWS LLC removed general Revision April 27 2010 1 4 4 Chapter Installation modified January 24 2011 1 4 5 New supported boards added to list August 1 2011 1 5 0 New file list diagnostic chapter modified December 20 2011 1 6 0 New IOCTL command TDRV002_IOCT_SET_FIFOTRIG January 20 2012 1 7 0 IOCTL command TDRV002_IOCQ_GET_INFO extended September 20 2012 1 8 0 New board type TXMC375 added March 26 2013 Description of allowed values changed in TDRV002_IOCT_SET_FIFOTRIG Chapter Special Baud Rates set via termios removed Description Setting up Baud Rates modified TDRV002 SW 82 Linux Device Driver Page 3 of 25 TENSE TECHNOLOGIES Table of Contents 1 INTRODUCTION cissi innana nana mananan anae awanan anaE rab S Naa AEN EAA EAIA a Na CENENA E EIKIN ENEE NA 5 2 ENEE a A E A T 7 2 1 Build and Install the Device Drive r
12. T or Exar XR17D35x PClexpress UART User Manual TDRV002 SW 82 Linux Device Driver Page 6 of 25 2 Installation The directory TDRV002 SW 82 on the distribution media contains the following files TDRV002 SW 82 1 8 0 pdf TDRV002 SW 82 SRC tar gz Release txt ChangeLog txt The GZIP compressed archive directories hal hal Makefile hal tdrvO02hal c hal tdrvO02haldef h serial serial Makefile serial tdrv002serial c serial tdrv002serialdef h serial 2 4 x serial 2 4 x Makefile serial 2 4 x tdrv002serial c serial 2 4 x tdrv002serialdef h serial makenode serial makenodeFM24 include tpmodule c include tpmodule h include config h include tpxxxhwdep c include tpxxxhwdep h example Makefile example tdrv002example c example tdrv002setspeed c example tdrv002bist c example tdrv002config c example tdrv002readinfo c tdrv002 h tdrvO02user h Makefile TENSE TECHNOLOGIES This manual in PDF format GZIP compressed archive with driver source code Release information Release history TDRV002 SW 82 SRC tar gz contains the following files and Hardware abstraction layer driver needed for all kernel versions HAL driver makefile HAL driver source file HAL driver private header file UART driver directory for Kernels 2 6 x and newer Serial driver makefile Serial driver source file Serial driver private header file Kernel 2 4 x sources directory Serial driver makefile Serial driver source file Serial driver pr
13. V002_ nodes will be automatically removed from your file system after this Be sure that the driver isn t opened by any application program If opened you will get the response tdrv002serialdrv Device or resource busy and the driver will still remain in the system until you close all opened files and execute modprobe r again 2 5 Change Major Device Number This paragraph is only for Linux kernels without a device file system devfs udev installed The released TDRV002 driver uses 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 tdrvO02serial c change the following symbols to appropriate values and enter make install to create a new driver TDRV002_TTY_ 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 TDRV002_CUA_MAJOR Defines the value for the dial out device Valid numbers are in range between 0 and 255 A value of 0 means dynamic number allocation Example define TDRV002_TTY_MAJOR 122 define TDRV002_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 TDRV002 driver
14. erface of certain channel TDRVO02_INTF_OFF config result loctl tty2 TDRVO02_IOCT_CONF_TRANS config if result lt 0 handle errors ERRORS Error Code Description ENODEV The selected device has no programmable physical interface See Hardware User Manual for detailed information about programmable transceivers TDRV002 SW 82 Linux Device Driver Page 17 of 25 TEWS amp TECHNOLOGIES 3 2 3 TDRV002_lIOCT_SPEED NAME TDRV002_IOCT_SPEED Setup user defined baud rates DESCRIPTION This ioctl function sets up a user defined baud rate This allows using the TDRV002 device with every adjustable baud rate The new baud rate is passed by value by the parameter arg to the driver The baud rate limits are device and configuration dependent so please refer to the suitable manual The function tries to set the baud rate in X16 mode if the nearest configurable baud rate has a difference greater than 3 to the chosen one the driver will setup the baud rate in X8 mode or in X4 mode if supported by hardware If a user defined baud rate is set standard tools like sity will return invalid information about the selected baud rate EXAMPLE include lt tdrv002user h gt int result ttyl Setup 14400 Baud result ioctl ttyl TDRVO02_IOCT_SPEED 14400 if result lt 0 handle errors TDRV002 SW 82 Linux Device Driver Pa
15. ge 18 of 25 TEWS amp TECHNOLOGIES 3 2 4 TDRV002_IOCQ_GET_SPEED NAME TDRV002_IOCQ_GET_SPEED Read the current configured baud rate DESCRIPTION This ioctl function returns the currently configured baud rate of the specified channel This allows checking if a baud rate can be configured correctly or if it is substituted by the nearest configurable baud rate The current baud rate is returned in the integer argument the parameter arg points on EXAMPLE include lt tdrv002user h gt int result ttyl baudrate result ioctl ttyl TDRVO02_IOCQ_GET_SPEED amp baudrate if result lt 0 handle errors else printf Current Baudrate d n baudrate TDRV002 SW 82 Linux Device Driver Page 19 of 25 TENSE TECHNOLOGIES 3 2 5 TDRV002_IOCQ_GET_INFO NAME TDRV002_IOCQ_GET_INFO Reads information about the position and type of a channel DESCRIPTION This ioctl function reads the module position module ID and the local channel number of a specified channel This information may allow an easier module identification and configuration checking in the system A pointer to the information buffer TDRV002_GET_INFO_STRUCT is passed by the parameter arg to the driver typedef struct int pciBusNo int pciParentBusNo int pciDeviceNo int localChannelNo int deviceld int subSystemld char typeStr 20 int intfProgrammable unsigned char intfConfig
16. has changed and the makenode script isn t used TDRV002 SW 82 Linux Device Driver Page 9 of 25 TENSE TECHNOLOGIES 3 Device Driver Programming The TDRV002 SW 82 driver loosely bases 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 Setting up Baud Rates The driver allows setting all baud rates supported by the channel Not only standard baud rates are supported also special baud rates are supported The driver will always try to set the best matching baud rate There are two possibilities setting up baud rates The first is used to setup predefined baud rates this is the standard way by using the termios structure e g using ssty The second way allows the selection of all baud rates the module can support This way uses the ioctl function TDRV002_IOCT_SPEED please refer to the description of the ioctl function TDRV002 SW 82 Linux Device Driver Page 10 of 25 TEWS amp TECHNOLOGIES 3 2 ioctl NAME ioctl device control functions SYNOPSIS include lt sys ioctl h gt include lt tdrv002 h gt include lt tdrv002user h gt int ioctl int filedes int request void argp DESCRIPTION The ioctl function sends a control code directly to a device
17. ination clear to disable it Set to enable slew limit mode clear to disable it Set to shutdown the whole transceiver circuit clear to enable the transceiver Set to enable UART Auto RS485 Mode clear to disable it See UART XR17D15x Hardware User Manual Beside the certain flags the tdrvOO2user h header file offers a set of standard configurations that could be used alternatively The following predefined macros could be used Value TDRV002_INTF_OFF TDRVO002_INTF_RS232 TDRV002_INTF_RS422 TDRV002_INTF_RS485FDM TDRVO002_INTF_RS485FDS TDRV002_INTF_RS485HD TDRV002 SW 82 Linux Device Driver Meaning Shutdown mode disable interface RS232 RS422 Multidrop Full Duplex RS485 Full Duplex Master RS485 Full Duplex Slave RS485 Half Duplex Page 16 of 25 TEWSS amp TECHNOLOGIES EXAMPLE include lt tdrv002user h gt unsigned long config int result int ttyl tty2 device handles of modules with programmable transceivers Setup channel as RS485 Full Duplex Master config TDRV0O02_CFG_RS485_RS232 TDRVO02_CFG_RTERM TDRVO02_CFG_TTERM result ioctl ttyl TDRV002_IOCT_CONF_TRANS config if result lt 0 handle errors Setup channel as RS485 Full Duplex Master alternative way TDRVO02_INTF_RS485FDM config result ioctl ttyl TDRV002_IOCT_CONF_TRANS config if result lt 0 handle errors Shutdown the physical int
18. ircuit format tdrv002config lt minorl gt lt options gt example tdrv002config 0 crs485 crterm configures dev ttySTDRV002_0 to RS422 full duplex master List of all options ers485 chdplx crena crterm ctterm cslewlimit cshdn cautors485 For detailed configuration options information see TDRV002_IOCT_CONF_TRANS ioctl function description TDRV002 SW 82 Linux Device Driver Page 24 of 25 5 Diagnostic If the TDRV002 driver does not work properly it is helpful to get some status information from the driver respective kernel TENSE TECHNOLOGIES The Linux proc file system provides information about kernel resources driver devices and so on The following screen dumps display information of a correct running TDRV002 driver see also the proc man pages The example output below has been created with kernel 3 1 5 2 fc16 x86_64 and an installed TPMC461 serinfo 0 uart XR17D1 1 uart XR17D1 2 uart XR17D1 3 uart XR17D1 4 uart XR17D1 5 uart XR17D1 6 uart XR17D1 7 uart XR17D1 dev tty dev console dev ptmx dev vc 0 tdrv002serial usbserial serial pty_slave pty_master unknown lspci v 1 0 driver revision 5X mmio 0xFEB9FO00 irg 1 5X mmio 0xFEB9F200 irq 1 5X mmio 0xFEB9F400 irq 1 5X mmio 0xFEB9F600 irq 1 5X mmio 0xFEB9F800 irq 1 5X mmio 0xFEB9FAOO irg 1 5X mmio 0xFEB9FCOO irg 1 cat proc tty driver tdrv002serial 5X mmio 0xFEBQ9
19. ivate header file Shell script to create devices nodes without a device FS Same as makenode with additional support for CUA devices Driver independent library Driver independent library header file Driver independent library header file HAL low level WINNT style hardware access functions source file Access functions header file Example application makefile Send and receive example application Speed configuration example application Example for using Built In Self Test Command Line Tool for transceiver programming Example displays hardware information of a channel Driver header file User application header file Top level Makefile In order to perform an installation extract all files of the archive TDRV002 SW 82 SRC tar gz to the desired target directory Note to extract the archive file use tar xvzf TDRV002 SW 82 SRC tar gz e Login as root and change to the target directory e Copy tdrv002user h to usr include TDRV002 SW 82 Linux Device Driver Page 7 of 25 TEWS amp TECHNOLOGIES 2 1 Build and Install the Device Driver e Login as root e Change to the tdrv002 target directory e To create and install the HAL driver and SERIAL driver in the module directory ib modules lt version gt misc enter make install e To update the device driver s module dependencies enter depmod aq 2 2 Uninstall the Device Driver e Login as root e Change to the tdrv002 target directory e Toremove the driver
20. ooled TPMC375 8 Channel Serial Interface PMC Conduction Cooled TPMC376 4 Channel Serial Interface PMC Conduction Cooled TPMC377 4 Channel Isolated Serial Interface PMC Conduction Cooled TPMC460 16 Channel Serial Interface PMC TPMC461 8 Channel Serial Interface PMC TPMC462 4 Channel Serial Interface PMC TPMC463 4 Channel Serial Interface PMC TPMC465 8 Channel Serial Interface PMC TPMC466 4 Channel Serial Interface PMC TPMC467 4 Channel Serial Interface PMC TPMC470 4 Channel Isolated Serial Interface PMC TDRV002 SW 82 Linux Device Driver Page 5 of 25 TCP460 TCP461 TCP462 TCP463 TCP465 TCP466 TCP467 TCP469 TCP470 TXMC375 16 Channel Serial Interface 8 Channel Serial Interface 4 Channel Serial Interface 4 Channel Serial Interface 8 Channel Serial Interface 4 Channel Serial Interface 4 Channel Serial Interface 8 Channel Isolated Serial Interface 4 Channel Isolated Serial Interface 8 Channel Serial Interface CompactPCl CompactPCl CompactPCl CompactPCl CompactPCl CompactPCl CompactPCl CompactPCl CompactPCl TEWS amp TECHNOLOGIES XMC Conduction Cooled In this document all supported modules and devices will be called TDRV002 Specials for certain devices will be advised To get more information about the features and use of the supported devices it is recommended to read the manuals listed below Corresponding Modules Hardware User Manual Corresponding Modules Engineering Manual Exar XR17D15x PCI UAR
21. roduction The TDRV002 SW 82 Linux device driver is a full duplex serial driver which allows the operation of a supported serial PMC on Linux operating systems The TDRV002 SW 82 device driver is based on the standard Linux serial device driver and supports all standard terminal functions TERMIOS Supported features Extended baud rates up to 5 5296 Mbaud Depending on the board 64 Byte or 256 Byte transmit and receive hardware FIFO per channel Programmable trigger level for transmit and receive FIFO Hardware RTS CTS and software flow control XON XOFF directly 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 e g RS 232 RS 422 Designed as Linux kernel module with dynamic loading Supports shared IRQ s Built on new style PCI driver layout Creates a TTY device ttyTDRV002 and dial out device cuaT DRV002 Kernel 2 4 x with dynamically allocated or fixed major device numbers DEVFS and UDEV support for automatic device node creation VVVV VVVVV v The TDRV002 SW 82 device driver supports the modules listed below TPMC371 8 Channel Serial Interface PMC Conduction Cooled TPMC372 4 Channel Serial Interface PMC Conduction C
22. specified by filedes causing the corresponding device to perform the requested operation The argument request specifies the control code for the operation The optional argument argo depends on the selected request and is described for each request in detail later in this chapter The following ioctl codes are defined in tdrvO02user h Value Meaning TDRV002_IOCQ_ BIST Start Built In Self Test TDRV002_IOCT_CONF_TRANS Configure transceiver physical interface TDRV002_IOCT_ SPEED Setup user defined baud rates TDRV002_lIOCQ_GET_ SPEED Returns the current configured baud rate TDRV002_IOCQ_GET_INFO Reads out hardware information of a channel TDRV002_IOCT_SET_FIFOTRIG Configure FIFO trigger levels See below for more detailed information on each control code To use these TDRV002 specific control codes the header file tdrvO002user h must be included in the application RETURNS On success zero is returned In case of an error a value of 1 is returned The global variable errno contains the detailed error code TDRV002 SW 82 Linux Device Driver Page 11 of 25 TEWSS amp TECHNOLOGIES ERRORS Error Code Description EINVAL Invalid argument This error code is returned if the requested ioctl function is unknown Please check the argument request Other function dependent error codes will be described for each ioctl code separately Note the TDRV002 driver always returns standard Linux error codes SEE ALSO
Download Pdf Manuals
Related Search
Related Contents
平成23年5月15日号 Configurador Spyder5ELITE Benutzerhandbuch Micromatic 14E PDF CL-123 User Manual Submersible Variable Fluorescence System User`s Manual Nokia C5 2.2" 89.3g Black Copyright © All rights reserved.
Failed to retrieve file