The simplest read operation targets a configuration register such as the COR0 or STAT register. Any configuration register with read access can be read through the JTAG interface, although not all registers offer read access. The procedure for reading the STAT register through the JTAG interface follows:
- Reset the TAP controller.
- Shift the
CFG_INinstruction into the JTAG Instruction register through the Shift-IR state. The LSB of theCFG_INinstruction is shifted first; the MSB is shifted while moving the TAP controller out of the SHIFT-IR state. - Shift packet write commands
into the CFG_IN register through the Shift-DR state:
- Write the synchronization word to the device.
- Write at least one
NOOPinstruction to the device. - Write the read STAT register packet header to the device.
- Write two dummy words to the device to flush the packet buffer.
The MSB of every configuration packet sent through the CFG_IN register must be sent first. The LSB is shifted while moving the TAP controller out of the SHIFT-DR state.
- Shift the
CFG_OUTinstruction into the JTAG Instruction register through the Shift-IR state. The LSB of theCFG_OUTinstruction is shifted first; the MSB is shifted while moving the TAP controller out of the SHIFT-IR state. - Shift 32 bits out of the Status register through the Shift-DR state.
- Reset the TAP controller.
The following table describes the readback command sequence.
| Step | Description | Set and Hold | Number of Clocks (TCK) | |
|---|---|---|---|---|
| TDI | TMS | |||
| 1 | Clock five 1 s on TMS to bring the device to the TLR state |
X
|
1
|
5 |
| Move into the RTI state. |
X
|
0
|
1 | |
| Move into the Select-IR state. |
X
|
1
|
2 | |
| Move into the Shift-IR state. |
X
|
0
|
2 | |
| 2 | Shift the first five bits of the CFG_IN instruction, LSB first. |
00101 (CFG_IN) |
0
|
5 |
| Shift the MSB of the CFG_IN instruction while exiting SHIFT-IR. |
0
|
1
|
1 | |
| Move into the SELECT-DR state. |
X
|
1
|
2 | |
| Move into the SHIFT-DR state. |
X
|
0
|
2 | |
| 3 | Shift configuration packets into the CFG_IN data register, MSB first. |
|
0
|
159 |
| Shift the LSB of the last configuration packet while exiting SHIFT-DR. |
0
|
1
|
1 | |
| Move into the SELECT-IR state. |
X
|
1
|
3 | |
| Move into the SHIFT-IR state. |
X
|
0
|
2 | |
| 4 | Shift the first five bits of the CFG_OUT instruction, LSB first. |
00100 (CFG_OUT) |
0
|
5 |
| Shift the MSB of the CFG_OUT instruction while exiting Shift-IR. |
0
|
1
|
1 | |
| Move into the SELECT-DR state. |
X
|
1
|
2 | |
| Move into the SHIFT-DR state. |
X
|
0
|
2 | |
| 5 | Shift the contents of the STAT register out of the CFG_OUT data register. |
0xSSSSSSSS
|
0
|
31 |
| Shift the last bit of the STAT register out of the CFG_OUT data register while exiting SHIFT-DR. |
S
|
1
|
1 | |
| Move into the Select-IR state. |
X
|
1
|
3 | |
| Move into the Shift-IR State. |
X
|
0
|
2 | |
| 6 | Reset the TAP Controller. |
X
|
1
|
5 |
The packets shifted into the JTAG CFG_IN register are identical to the packets shifted in through the SelectMAP interface when reading the STAT register through SelectMAP.