JTAG Chain Debugging
We assume that at startup all devices are reset (either through a power-up reset or through their nTRST signal, which they must have if there is no on-chip power-up reset). Then we know that the JTAG state machine is in the RESET state when we start to clock the JTAG chains.
It is also known that the TMS and TDI signals will read the value '1' if open circuited (IEEE 1149.1-1990).
The most likely problems encountered are:
- One of the external signals (TDI, TMS, TCK or TDO) is either open circuit or shorted.
- One of the global signals (TMS or TCK) is open circuit to one device.
- One of the links between devices is broken.
- One of the devices is in reset.
The most frequent problem is with a device being in reset. This is often seen as detecting too few devices in the JTAG chain.
With reference to the diagram, the following symptoms may be seen for each type of error:
Error 1: TDI input broken
This would give valid ID codes and the correct number of devices in the JTAG chain, but the user would not be able to shift data into the chain (or change the JTAG instruction). In fact, the next time the instruction was shifted, it would always be sent into BYPASS, so the JTAG chain length would then be incorrect. If the TDI input was stuck at zero, the chain would automatically go to EXTEST and all bits of the boundary scan register would be set to zero (including the control cells).
Error 2: TCK or TMS broken to one or more devices
In this case the user would see nothing out of the specific device. I.e. the TDO pin would stay in a floating state, since it could not be put into one of the scan states. If the last device in the chain was affected, the system would find nothing in the chain.
Error 3: TDI-TDO chain broken between two devices
If the chain was broken, no data would be transferred between devices, but the ID code of the last device in the chain would be read correctly. In this case, the system would say that there was only one device in the JTAG chain, namely the final device.
Error 4: TDO broken at end of JTAG chain
The effect of this fault is the same as if the last device in the chain had no TMS / TCK, or if the last device was in reset. The TDO read would always be 1 and the system would say there was nothing on the JTAG chain.
Error 5: One of the devices is in RESET
Often, the problem lies with a compliance pin which must be held at a particular logic level for the JTAG chain to shift correctly. If this device's boundary scan logic was held in reset, it would not assert its TDO pin and the system would indicate that this was the end of the chain. N.B. This is harder to find if the device in RESET is the last one in the chain, as then the system would report that there are no devices at all.