Using a Test Reset section to Initialise JTAG Devices
Some JTAG devices require a specific sequence of states to be applied to some signals in order to put the device into a JTAG-compliant mode. This application note describes how a Test Reset section can be used to describe the required sequence and control its application.
Using Test Reset Sequences
The SEQUENCES section of the XJEase project file has been added to allow you to specify a sequence that will put the JTAG devices into a JTAG-compliant mode.
For example, some members of the Texas Instruments TMS320 DSP range require that the TAP port signal nTRST is first held low for a few TCK cycles and then raised after the TCK signal has started running, so that the DSP can detect a rising edge on nTRST.
A first thought might be to set the nTRST signal as a fixed logic '1' signal on pin 3 in the connector pinmap definition:
MAPPING TDI := 5; TDO := 13; TMS := 7; TCK := 9; HIGH := 3; LOW := 6, 8, 10, 11, 12, 14, 15, 16, 17, 18, 19; POWER := OFF; END;
However, this will not work for the DSPs described above, as clocking on TCK will not commence until after the signal on pin 3 of the connector (nTRST) has been set high as defined. The SEQUENCES section allows this problem to be overcome, as shown in the following example:
MAPPING TDI := 5; TDO := 13; TMS := 7; TCK := 9; NTRST := 3; LOW := 6, 8, 10, 11, 12, 14, 15, 16, 17, 18, 19; POWER := OFF; END; SEQUENCES SEQUENCE "TRST" SET TCK := 0, NTRST := 0; SET TCK := 1; SET TCK := 0; SET TCK := 1; SET TCK := 0; SET TCK := 1; SET TCK := 0; SET TCK := 1; SET TCK := 0, NTRST := 1; SET TCK := 1; END; TEST_RESET := "TRST"; END;
Here, nTRST has been defined in the MAPPING section as an I/O pin with the name NTRST and as pin 3 on the connector. The subsequent SEQUENCES section describes the sequence of signals that will put the device into a JTAG-compliant mode. In this case, nTRST is held low and then raised on the 5th TCK cycle so that the DSP 'sees' the rising edge of nTRST.
The above syntax can be used both in the XJEase project file and in a pinmap definition file (.xjpm).