SLAU320AJ July 2010 – May 2021
If the JTAG TAP controller is in the Run-Test/Idle state, the TDI slot can provide the TCLK signal (that is, it can clock the target CPU). Following this implementation, the generation of a complete TCLK clock cycle requires two TDI slots, one of which sets the TCLK signal and one of which clears it. In each case, the SBWTDIO signal must be set low in the TMS slot to keep the TAP controller from leaving the Run-Test/Idle state. To provide only a falling edge for ClrTCLK, the SBWTDIO signal must be set high before entering the TDI slot. The corresponding rising edge must occur in the low phase of SBWTCK in the TMS slot. Otherwise it would be interpreted as a trigger for TMS = 1 and the TAP controller would leave Run-Test/Idle mode.
Figure 2-11 shows handling of TCLK in SBW mode. See the reference functions SetTCLK_sbw and ClrTCLK_sbw in the MSP430 Replicator project (slau320.zip) for software implementation. The provided code example for the MSP430Xv2 architecture uses preprocessor definitions to enable a better layered software architecture. The upper software layers can simply reference the SetTCLK and ClrTCLK symbols while the actual implementation symbols are SetTCLK_4wire and ClrTCLK_4wire for 4-wire JTAG and SetTCLK_sbw and ClrTCLK_sbw for Spy-Bi-Wire (SBW).