Defaultsoftresethandler (), Defaultsysfailhandler (controller) – National Instruments NI-VXI User Manual

Page 99

Advertising
background image

Chapter 3 Software Overview

© National Instruments Corporation

3-61

NI-VXI User Manual

low-level VXI/VMEbus access functions will be reported to this
handler. See also the descriptions of

SetBusErrorHandler

and

GetBusErrorHandler

.

DefaultSoftResetHandler ()

DefaultSoftResetHandler

is the sample handler for the Soft Reset

interrupt, and is installed as a default handler when

InitVXIlibrary

initializes the NI-VXI software. It increments the global variable

SoftResetRecv

. When the Reset bit in the VXI Control register of

the local CPU is written, the VXI interface (if an embedded CPU) and
the VXI register sets are reset (VXI logical address and address base
are retained). The write to the Reset bit causes an interrupt on the local
CPU, which can be handled in any appropriate manner. The CPU
cannot restart operation until the Reset bit is cleared. After the Reset bit
is cleared, the local CPU can go through a reinitialization process or
reboot altogether. If the local CPU is the Resource Manager (and
top-level Commander), the Reset bit should never be written. Writing
the Reset bit of any device should be reserved for the Commander of
the device.

EnableSoftReset

must be called to enable writes to the

Reset bit to generate interrupts to the local CPU after the

InitVXIlibrary

call.

Note:

The Soft Reset interrupt does not apply to VME.

DefaultSysfailHandler (controller)

DefaultSysfailHandler

is the sample handler for the Sysfail

interrupt, and is installed as a default handler when

InitVXIlibrary

initializes the NI-VXI software. The VXIbus specification requires that
all VXI Commanders monitor the PASSed or FAILed state of their
VXI Servants. When a VXIbus device is in the FAILed state, the
failed device clears its PASS bit (in its Status register) and asserts the
SYSFAIL* signal on the VXIbus backplane. A Sysfail condition
detected on the local CPU generates an interrupt that calls the current
Sysfail interrupt handler. The failed Servant device must be
forced offline or brought back online in an orderly fashion.

DefaultSysfailHandler

scans the local CPU Servants and if a

Servant is detected to have failed, the Servant’s Sysfail Inhibit bit in its
Control register is set. In addition, the global variable

SysfailRecv

is

incremented.

Advertising