Responding to Changes in Device Parameters. Wind River VxWorks

VxWorks is an operating system for real-time and embedded applications. The VxWorks Device Driver Developer's Guide is a document that provides developers with the information they need to develop device drivers for the VxWorks operating system. This document covers the fundamentals of writing device drivers, as well as provides class-specific information for various driver classes. It also includes information on migrating legacy model drivers to the VxBus model.

PDF
Document
VxWorks Device Driver Developer's Guide | Manualzz

Advertisement

Advertisement

/

Advertisement

Key features

  • Fundamentals of writing device drivers

  • Class-specific information for various driver classes

  • Information on migrating legacy model drivers to the VxBus model

  • Real-time performance

  • Code size

  • Driver flexibility

  • Code maintainability

  • Code readability

  • Driver Configurability

Frequently asked questions

VxWorks is an operating system for real-time and embedded applications.

The VxBus driver model is the preferred method for developing new device drivers for VxWorks.

VxWorks supports a variety of driver classes, including serial drivers, storage drivers, network interface drivers, non-volatile RAM drivers, timer drivers, DMA controller drivers, bus controller drivers, USB drivers, interrupt controller drivers, and multifunction drivers.

The primary goal for most VxWorks drivers is real-time performance of the target system as a whole. Other important design goals include memory footprint, driver flexibility, code maintainability, code readability, and driver configurability.

User questions

A F

James A.

How can a PCIe device be registered and enabled using VxWorks drivers?

To register and enable a PCIe device using VxWorks drivers, the process generally involves: Driver Registration: Using vxbDevRegister() to register the driver with VxBus, populating vxbDevRegInfo with device ID, bus ID, driver name, and function pointers. Hardware Discovery: Bus controller drivers are responsible for discovering devices and configuring downstream devices. Device Matching: VxBus verifies the driver's registered bus type matches the device; for PCIe, device ID and vendor ID are commonly used. Interrupt Enable: After registration, vxbIntEnable() is used to enable the delivery of a device interrupt. Resource Allocation: Access to hardware registers requires finding the base address and mapping it using vxbRegMap(), then using vxbRead*() and vxbWrite*() functions.

T O

Jennifer T.

What does 'no-map' signify in the context of device drivers and how can such issues be addressed?

In general computing and device driver contexts, 'no-map' typically refers to a situation where a memory region or hardware register address space is not successfully mapped into the CPU's addressable memory. This can lead to issues where the device driver is unable to read from or write to the hardware registers, making communication with the device impossible.

Common reasons for a 'no-map' situation can include incorrect base addresses, missing or incorrect memory mapping configuration (e.g., in the Board Support Package or BSP), hardware issues, or permissions. To address such an issue, one would generally need to verify the hardware configuration, review the BSP's memory mapping setup, and ensure the device driver is using the correct addresses.

C S

James C.

How is an Interrupt Service Routine (ISR) connected to a device driver in VxWorks?

In modern VxWorks, device drivers use operating system services (like vxbIntConnect()) to connect ISRs, rather than the older intConnect() method. The number of interrupt sources the device generates must be known to connect the appropriate ISR to each hardware interrupt source.

C S

James C.

How can the impact of Interrupt Service Routines (ISRs) on system performance in VxWorks be minimized?

ISRs should be as short as possible to minimize system interrupt latency. isrDeferLib can be used to defer any lengthy processing to the task level.

C S

James C.

What VxWorks operating system services are available for deferring work from an ISR to a task?

isrDeferQueueGet() returns a handle to an ISR deferred queue, and isrDeferJobAdd() adds a data structure describing the deferred work to the queue. This work is executed at the task level after the ISR completes.

A F

James A.

What is the purpose of the vxbDevRegister() function in VxWorks?

The vxbDevRegister() function is used by a driver to notify VxWorks that the driver is available and to provide required information about the driver during the driver registration phase.

Y S

Patricia Y.

What is the function of isrDeferJobAdd?

isrDeferJobAdd() adds a data structure describing deferred work to be performed onto an ISR deferral queue. This work is performed after the ISR enqueuing the work terminates and task processing resumes.

C S

James C.

What are interrupt indexes and how are they used within VxWorks?

Each interrupt signal generated by a device is identified by an interrupt index. Most devices generate a single interrupt, identified as interrupt index 0. More complex devices have multiple interrupt signals, assigned incrementing interrupt indexes starting from 0.

U R

James U.

What is a VXB_DEV_ID?

A unique identifier used by many VxBus routines to distinguish individual devices within the VxBus system.

Preparing document for printing…
0%