Skip to main content

TPMC861 VxWorks Device Driver: Complete Guide

·614 words·3 mins
VxWorks Device Driver TPMC861 RS422 RS485 TEWS Technologies
Table of Contents

The TPMC861-SW-42 VxWorks device driver is designed to support the TPMC861 4-Channel Isolated Serial Interface (RS422/RS485) module from TEWS Technologies. This driver integrates seamlessly with VxWorks real-time operating systems, providing robust and flexible serial communication support for embedded applications.

In this guide, we’ll explore:

  • Key features of the TPMC861 driver
  • Configuration and VxBus driver support
  • Legacy I/O compatibility
  • Basic I/O functions (open, read, write, ioctl)
  • Advanced features like FIFO trigger levels and RTP support

Introduction to TPMC861-SW-42
#

The TPMC861-SW-42 driver enables developers to operate the TPMC861 module in compliance with the VxWorks I/O system specification. It provides:

  • Basic I/O functions: open(), close(), read(), write(), and ioctl()
  • Buffered I/O functions: fopen(), fclose(), fprintf(), fscanf()
  • Advanced control via ioctl() for baud rate, parity, stop bits, and FIFO configurations

The driver supports both legacy systems and the modern VxBus-enabled driver model. While legacy functions exist, VxBus support is mandatory for VxWorks SMP systems and recommended for all new developments.

VxBus Driver Support
#

With VxBus integration, the TPMC861 devices are automatically detected and configured during system boot. Developers can customize driver behavior through configuration parameters.

Device Driver Configuration Parameters
#

  • Port Naming:

    • Default prefix: /tpmc861/
    • Channels numbered sequentially (e.g., /tpmc861/0, /tpmc861/1, etc.)
    • Supports custom naming to match local serial ports (/tyCo/n)
  • Software FIFO Configuration:

    • Default: 2048 Bytes for both RX and TX
    • Adjustable depending on application requirements
  • Default Port Settings:

    • 9600 Baud
    • 8 Data bits, 1 Stop bit
    • FIFO enabled (RX=56, TX=8 trigger levels)

RTP Support
#

The driver includes RTP (Real-Time Process) support, allowing TPMC861 devices to be tunneled from RTP contexts when properly configured.

Legacy Compatibility
#

For compatibility with pre-VxBus applications, initialization is done via tpmc861Init(), ensuring consistent behavior across both driver models.

Legacy I/O System Functions
#

Although modern projects should use VxBus, legacy APIs are still provided for backward compatibility:

  • tpmc861Drv() – Installs the driver into the I/O system
  • tpmc861DevCreate() – Creates devices on specific serial channels
  • tpmc861PciInit() – Initializes PCI devices (Intel x86 platforms)
  • tpmc861Init() – Installs the driver and adds all devices automatically

Basic I/O Functions
#

The TPMC861 driver provides all standard POSIX-style I/O functions:

1. open()
#

Opens a device for communication.
Example:

fd = open("/tpmc861/2", 0, 0);

2. close()
#

Closes an open device.

3. read()
#

Reads data from a device into a buffer.

4. write()
#

Writes data from a buffer to a device.

5. ioctl()
#

Provides extended device control, including:

  • FIOBAUDRATE – Set baud rate
  • FIO_EXAR16XXX_DATABITS – Configure data bits (5–8)
  • FIO_EXAR16XXX_STOPBITS – Set stop bits (1, 1.5, 2)
  • FIO_EXAR16XXX_PARITY – Configure parity (Even, Odd, Space, Mark)
  • FIO_EXAR16XXX_FIFO – Configure FIFO levels
  • FIO_EXAR16XXX_CHANNEL_INFO – Retrieve PCI and board info

Advanced Configuration: FIFO Trigger Levels
#

The driver allows tuning of FIFO trigger levels to balance system performance:

  • Higher RX trigger levels → fewer interrupts, higher risk of buffer overrun
  • Lower RX trigger levels → more interrupts, but safer data handling
  • TX trigger levels can reduce transmission gaps

This flexibility ensures that the driver can be optimized for both high-throughput and low-latency applications.

Why TPMC861-SW-42 Matters
#

The TPMC861-SW-42 driver is ideal for embedded systems developers working with VxWorks who require:

  • Reliable and isolated RS422/RS485 serial communication
  • Flexible configuration for custom I/O requirements
  • Future-proof design with support for VxBus and RTP

By combining compatibility, performance, and configurability, TEWS Technologies ensures the TPMC861 driver can meet the needs of both legacy systems and modern real-time embedded applications.

Conclusion
#

The TPMC861-SW-42 VxWorks device driver offers a comprehensive solution for developers integrating RS422/RS485 interfaces into embedded systems. With its support for VxBus, legacy functions, and advanced I/O controls, it provides the flexibility and reliability essential in demanding real-time environments.

For more details, visit TEWS Technologies.

Related

VxBus Driver Development: A Complete Guide for VxWorks Developers
·1223 words·6 mins
VxWorks VxBus Device Driver Embedded Systems RTOS Driver Development
Guide to PCI Device Driver Design and Programming in VxWorks
·870 words·5 mins
VxWorks PCI Device Driver
How to Optimize Interrupt Latency in VxWorks
·1532 words·8 mins
VxWorks Interrupt Latency Real-Time Systems Optimization RTOS