XJAPI_SetTrst

Set up a TRST (test reset) sequence for the board. A TRST sequence is a series of steps, each step consisting of a set of states to set pins on the connector to.

XJAPI_ERROR XJAPI_SetTrst(
    int stepCount,
    const unsigned int *values,
    const unsigned int *masks,
    BOOL addTmsReset
);

Version

This function was modified in XJTAG version 1.3.0, and so requires that XJAPI_VERSION be defined to be greater than or equal to 0x010300.

Arguments

stepCount
The number of steps in the sequence.
values
An array of bitmaps specifying the values to set the pins to. The array should contain stepCount elements, one element per step. The least significant bit of each value corresponds to pin 1 on the connector. Only bits with a bit set in the corresponding mask value are set.
masks
An array of bitmaps specifying which pins on the connector to actually drive. A zero in the bitmap indicates that the pin should be left as an input; one indicates that the pin should be driven to the value indicated in the corresponding value bitmap.
addTmsReset
Specify whether to add a TMS reset to the end of the sequence. Generally this flag should be set to TRUE.

Return value

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

Notes

The only pins that can be driven in a TRST sequence are the output JTAG pins (TDI, TMS and TCK) and any pins defined to be PIO pins in the pin mapping.

This function can only be used once the hardware has been initialised with XJAPI_HardwareSetup.