XJTAG

Apply for your FREE Trial of JTAG Boundary 
		Scan Development and Test Tools
Search

XJAPI - API for the XJLink USB JTAG connector

The XJAPI is an Application Program Interface (API) for Windows 2000 / XP / Vista, designed to allow a user to access the XJLink JTAG hardware interface directly. There are three categories of functions:

  1. Initialise, set up and terminate the API.
  2. Low level functions to set up JTAG scans and perform low level JTAG accesses.
  3. High level JTAG functionality.

The full C header file is available for download: XJAPI.h

The following is a summary of the functions:

Initialising / Terminating Functions

Function to set up the hardware and the pin mapping. Specify the desired frequency in Hertz (XJAPI will set to the nearest MHz), the required pin mapping and whether the power should be applied to the board.

XJAPI_HardwareSetup( frequency, pinMap, powerOn );

Function to release the hardware. Must be called before exiting.

XJAPI_HardwareRelease( );

Function to set the pin map - This function takes a parameter which is an array of 20 elements, corresponding to the 20 pins. Each value i should be the type of pin i+1, with the exception of the fixed pins:

  • pin 1 - VCC
  • pin 2 - NC
  • pin 4 - GND
  • pin 20 - GND

N.B. The array starts at 0 but the pins at 1, so the setting for pin 10 would be written in array[9].

XJAPI_SetPinMap( pinMapping, pinTypes[20], powerOn );

Low Level JTAG Access

Function to set the frequency - must be between 100000 and 33000000 Hz.

XJAPI_SetFrequency( frequency );

Function to apply TMS reset.

XJAPI_TmsReset( );

Function to go to a specific JTAG state.

XJAPI_GotoState( state );

Function to set the final state that the system goes to after a DR or IR scan operation. By default, both scans go to the JTAG_IDLE state.

XJAPI_SetEndState( endir, enddr );

Function to clock the JTAG chain a specific number of times.

XJAPI_ClockChain( count );

High Level Scan Functions

Function to execute a JTAG DR/IR scan cycle. By default, it will leave the system in the JTAG_IDLE state after the scan. To specify a different end state, use XJAPI_SetEndState.

The type of scan (DR or IR) is specified, the number of bits to scan, and the addresses of data buffers: "outData" is the data to be shifted out, bit 0 of byte 0 first; "inData" is the data shifted in, bit 0 of byte 0 first.

XJAPI_Scan( scanType, length, outData, inData );

Function to implement multiple scanning. This function is used to scan multiple (nScans) chains of mixed type (DR and IR scans) and of mixed length.

N.B. "scanTypes", "length", "outData" and "inData" are all arrays of length "nScans".

XJAPI_ScanMultiple( nScans, scanTypes, length, outData, inData );

For support, or for a quote on any part of the XJTAG system, please contact us.