# OpenOCD with HIE JTAG Adapter v1.2 - 2015.03.02 CH & WH # Use ACBUS6 pin as USB LED Drive v1.4 - 2015.10.16 WH interface ftdi ftdi_channel 0 ftdi_vid_pid 0x0403 0x6014 ftdi_device_desc "HIE JTAG Debugger" # A 1 in the Direction byte will make that bit an output. # The low byte would be ADBUS 7-0 GPIOL, and the high byte is ACBUS 7-0 GPIOH. # words: data, direction ftdi_layout_init 0x0c08 0x4f1b # Data: # 0 = GPIOH7 input, GPIOH6 output LOW, GPIOH5..GPIOH4 inputs # c = GPIOH3..GPIOH2 HIGH SRST_OE, TRST_OE; GPIOH1..GPIOH0 LOW SRST, TRST # 0 = GPIOL3..GPIOL1 (inputs); GPIOL0 LOW JTAG_OE # 8 = TMS HIGH; TDI, TCK LOW; TDO input # Direction: # 4 = GPIOH7 input, GPIOH6 output, GPIOH5..GPIOH4 inputs # f = GPIOH3..GPIOH0 outputs SRST_OE, TRST_OE, SRST, TRST # 1 = GPIOL3..GPIOL1 inputs RTCK, SRST_IN, VREF_IN; GPIOL0 output JTAG_OE # b = TCK, TDI, TMS = outputs, TDO = input # define both Reset signals ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400 ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800 # ftdi_layout_signal nTRST -noe 0x0400 # ftdi_layout_signal nSRST -noe 0x0800 # Reset configuration reset_config trst_and_srst srst_open_drain trst_open_drain # srst_pulls_trst adapter_nsrst_delay 400 jtag_ntrst_delay 400 # Toggle USB LED ftdi_layout_signal LED -ndata 0x4000 # A 1 in the Direction byte will make that bit an output. # 13, ADBUS0, Bit 0, TCK, O, MPSSE # 14, ADBUS1, Bit 1, TDI, O, MPSSE # 15, ADBUS2, Bit 2, TDO, I, MPSSE # 16, ADBUS3, Bit 3, TMS, O, MPSSE # 17, ADBUS4, Bit 4, JTAG_OE, O, GPIOL0, LOW = enable bus drivers # 18, ADBUS5, Bit 5, VREF_IN, I, GPIOL1, HIGH = target VCC on # 19, ADBUS6, Bit 6, SRST_IN, I, GPIOL1, LOW = SRST- active read from target # 20, ADBUS7, Bit 7, RTCK_FT, I, GPIOL3, RTCK from target # 21, ACBUS0, Bit 8, TRST, O, GPIOH0, always LOW # 25, ACBUS1, Bit 9, SRST, O, GPIOH1, always LOW # 26, ACBUS2, Bit 10, TRST_OE, O, GPIOH2, LOW = TRST active to target # 27, ACBUS3, Bit 11, SRST_OE, O, GPIOH3, LOW = SRST active to target # 28, ACBUS4, Bit 12, nu, I, GPIOH4 # 29, ACBUS5, Bit 13, nu, I, GPIOH5 # 30, ACBUS6, Bit 14, USB_LED, O, GPIOH6 # 31, ACBUS7, Bit 15, nu, I, GPIOH7 # 32, ACBUS8, nu # 33, ACBUS9, nu # Setup: # JTAG_OE_FT (ADBUS3) LOW == enables JTAG output drivers # TRST_FT (ACBUS0) LOW = TRST low but isolated with TRST_OE_FT to form an open drain output # TRST_OE_FT (ACBUS2) driven from OpenOCD, LOW enables the output driver to activate TRST # SRST_FT (ACBUS1) LOW = TRST low but isolated with SRST_OE_FT to form an open drain output # SRST_OE_FT (ACBUS3) driven from OpenOCD, LOW enables the output driver to activate SRST # JTAG signals: # TCK (Test Clock) – this signal synchronizes the internal state machine operations. # TDI (Test Data In) – this signal represents the data shifted into the device's test or programming logic. It is sampled at the rising edge of TCK when the internal state machine is in the correct state. # TDO (Test Data Out) – this signal represents the data shifted out of the device's test or programming logic and is valid on the falling edge of TCK when the internal state machine is in the correct state. # TMS (Test Mode Select) – this signal is sampled at the rising edge of TCK to determine the next state. # TRST (Test Reset) (low active) – this is an optional pin which, when available, can reset the TAP controller's state machine. # SRST (System Reset) (low active) - is used to reset the target system. # # TCK, TDI, TDO and TMS are driven by OpenOCD via "interface ftdi", only TRST and SRST need manual setup. # # set target board set SJC_TAPID 0x4ba00477 source [find tcl/target/imx6.cfg] # Speed 0 (khz) selects RTCK method. # 15MHz is working. adapter_khz 15000 $_TARGETNAME configure -event reset-start { adapter_khz 15000 } # --- eof ---