XJAPI_AutoSkew

Configure skew control.

XJAPI_ERROR XJAPI_AutoSkew(void);

Arguments

None

Return value

An XJAPI_ERROR value indicating whether the function call was successful or not.

Notes

The XJTAG system has the capability to compensate for skew in the chain. This function causes this process to happen and the system to discover the correct compensation to use for the particular target board and interconnecting cable. This function should be called whenever the pinmap or TCK frequency is changed.

Example

XJAPI_ERROR ec;

// Initialise the XJTAG system
XJAPI_Startup();

// Initialise the hardware, TCK frequency 1MHz, standard XJTAG pinmap
ec = XJAPI_HardwareSetup(0, 1 * 1000 * 1000, XJAPI_XJTAG, FALSE);
if (ec != XJAPI_SUCCESS) {
    char msg[256];
    XJAPI_GetLastError(msg, sizeof(msg));
    fprintf(stderr, "Error: %s\n", msg);
    return;
}

// Set up skew control
ec = XJAPI_AutoSkew();
if (ec != XJAPI_SUCCESS) {
    char msg[256];
    XJAPI_GetLastError(msg, sizeof(msg));
    fprintf(stderr, "Error: %s\n", msg);
    return;
}

// access the chain ...