jtag/drivers/jlink: Use correct command errors
[openocd.git] / tcl / target / ti-cjtag.cfg
blob97111f1cc44e4d2e521ce794a208949b4f6ab16c
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # A start sequence to change from cJTAG to 4-pin JTAG
4 # This is needed for CC2538 and CC26xx to be able to communicate through JTAG
5 # Read section 6.3 in http://www.ti.com/lit/pdf/swru319 for more information.
6 proc ti_cjtag_to_4pin_jtag {jrc} {
7         # Bypass
8         runtest 20
9         irscan $jrc 0x3f -endstate RUN/IDLE
10         # Two zero bit scans and a one bit drshift
11         pathmove RUN/IDLE DRSELECT DRCAPTURE DREXIT1 DRPAUSE
12         pathmove DRPAUSE DREXIT2 DRUPDATE RUN/IDLE
13         pathmove RUN/IDLE DRSELECT DRCAPTURE DREXIT1 DRPAUSE
14         pathmove DRPAUSE DREXIT2 DRUPDATE RUN/IDLE
15         pathmove RUN/IDLE DRSELECT DRCAPTURE DREXIT1 DRPAUSE
16         pathmove DRPAUSE DREXIT2 DRSHIFT DREXIT1 DRUPDATE RUN/IDLE
17         pathmove RUN/IDLE DRSELECT DRCAPTURE DREXIT1 DRPAUSE
19         # A two bit drhift and a 9 bit drshift
20         pathmove DRPAUSE DREXIT2 DRSHIFT DRSHIFT DREXIT1 DRUPDATE RUN/IDLE
21         pathmove RUN/IDLE DRSELECT DRCAPTURE DREXIT1 DRPAUSE
22         pathmove DRPAUSE DREXIT2 DRSHIFT DRSHIFT DREXIT1 DRPAUSE
23         pathmove DRPAUSE DREXIT2 DRSHIFT DRSHIFT DREXIT1 DRPAUSE
24         pathmove DRPAUSE DREXIT2 DRSHIFT DRSHIFT DREXIT1 DRPAUSE
25         pathmove DRPAUSE DREXIT2 DRSHIFT DRSHIFT DREXIT1 DRPAUSE
26         pathmove DRPAUSE DREXIT2 DRSHIFT DREXIT1 DRPAUSE
27         pathmove DRPAUSE DREXIT2 DRUPDATE RUN/IDLE
28         pathmove RUN/IDLE DRSELECT DRCAPTURE DREXIT1 DRPAUSE
30         # Bypass
31         irscan $jrc 0x3f -endstate RUN/IDLE
33         # Set ICEPick IDCODE in data register
34         irscan $jrc 0x04 -endstate RUN/IDLE