; -------------------------------------------------------------------------------- ; @Title: Example for manual JTAG access, Debugger in Up Mode ; @Description: ; This script reads out the IDCODE of an ARM7 core when the debugger is in ; UP mode. ; Detailed knowledge about JTAG is required to use manual JTAG control signals! ; Tested on an ARM7 target board. ; @Props: Template ; @Keywords: idcode ; @Author: PEG, MAZ ; @Copyright: (C) 1989-2014 Lauterbach GmbH, licensed for use with TRACE32(R) only ; -------------------------------------------------------------------------------- ; $Id: example2.cmm 8576 2015-08-11 12:51:10Z mzens $ ; The debugger is in UP mode (e.g. after SYStem.Up). ; The JTAG driver is enabled. ; The parking state of the ARM debugger is the Select-DR state. ; The debugger may not be disturbed by the manual control sequence. Therefore you need to take care of the following: ; * Do not assert the chip reset signal. This would influence the core state and probably also reset the debug register which are used by the debugger. ; * Do not assert the JTAG reset signal and do not go through Run-Test Idle state. Both would reset the debug register which are used by the debugger. ; * The JTAG TAP is in Select-DR state and must be returned to this state after the manual sequence. ; * The IR register should be left with BYPASS instruction JTAG.LOCK ; grab exclusive control of the JTAG port JTAG.SHIFTTMS 1 0 0 ; Select-DR -> Shift-IR JTAG.SHIFTREG 0 1 1 1 ; shift in IDCODE instruction JTAG.SHIFTTMS 1 1 0 0 ; Exit1-IR -> Shift-DR JTAG.SHIFTREG 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; shift in 32 dummy bits to get the IDCODE PRINT JTAG.SHIFT() ; print result JTAG.SHIFTTMS 1 1 ; Exit1-DR -> Select-DR JTAG.SHIFTTMS 1 0 0 ; Select-DR -> Shift-IR JTAG.SHIFTREG 1 1 1 1 ; shift in BYPASS instruction JTAG.SHIFTTMS 1 1 ; Exit1-DR -> Select-DR JTAG.UNLOCK ; return control to the debugger ENDDO