Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Bus Errors Executing VXI Move Functions or Using Shared Memory on Mac OS 9.x with PCI-MXI-2

Primary Software: Driver Software>>NI-VXI/VISA
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: VXI/VME/MXI>>MXI Interfaces>>PCI-MXI-2

Problem: On Mac OS 9.x., I receive a bus error when making calls such as VXImove() or accessing shared memory on a device.

Solution: Functions such as VXImove use DMA to transfer the data. Bus errors occur because the PCI-MXI-2 is not being allowed to master the PCI bus, so the DMA effort fails. This problem exists because there is a specific bit on the PCI interface that enables PCI-MXI-2 to master the PCI bus. The operating system or the NI-VXI driver do not currently set the bit. To correct this problem, you need to set this bit in your code. After you set the value, it should not need to be rewritten unless the computer is restarted.

You can call the following functions to set the bit properly and to read back that it was set properly:

LPeek ( 0x1B04, 4 , &val32); // Read 32 bit value at address 0x1B04
val32 |= 0x06; // Bitwise-Or the returned value with 0x06
LPoke ( 0x1B04, 4, val32); // Write the new 32 bit value back to address 0x1B04


Note: The functions LPeek and LPoke are not documented in the NI-VXI online help, but they are defined as listed below in the header file nivxi.h, which the NI-VXI driver installs.

extern NIVXI_STATUS NIVXI_FN LPeek (UINT32 address, UINT16 width, void NIVXI_DT *value)
extern NIVXI_STATUS NIVXI_FN LPoke (UINT32 address, UINT16 width, UINT32 value)


Related Links:

Attachments:





Report Date: 03/01/2002
Last Updated: 12/08/2004
Document ID: 2J0G7200

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit