2022-06-12 16:50:59 -05:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2019-06-28 08:45:23 -05:00
|
|
|
# isodebug v1
|
|
|
|
# 5 kV isolated JTAG/SWD + UART adapter by Unjo AB
|
|
|
|
|
|
|
|
adapter driver ftdi
|
2021-06-23 13:54:49 -05:00
|
|
|
ftdi vid_pid 0x22b7 0x150d
|
2019-06-28 08:45:23 -05:00
|
|
|
|
2021-06-23 13:54:49 -05:00
|
|
|
ftdi layout_init 0x0ff8 0xfffb
|
2019-06-28 08:45:23 -05:00
|
|
|
|
2021-06-23 13:54:49 -05:00
|
|
|
ftdi layout_signal LED -ndata 0x0100
|
|
|
|
ftdi layout_signal nTRST -data 0x0200
|
|
|
|
ftdi layout_signal nSRST -noe 0x0400
|
|
|
|
ftdi layout_signal SWDIO_OE -data 0x0008
|
2019-06-28 08:45:23 -05:00
|
|
|
|
|
|
|
# Mode signals, either of these needs to be high to drive the JTAG/SWD pins.
|
|
|
|
# The power-on state is low for both signals but the init setting above sets
|
|
|
|
# JTAG_EN high.
|
2021-06-23 13:54:49 -05:00
|
|
|
ftdi layout_signal SWD_EN -data 0x1000
|
|
|
|
ftdi layout_signal JTAG_EN -data 0x0800
|
2019-06-28 08:45:23 -05:00
|
|
|
|
|
|
|
# In SWD mode, the JTAG_EN signal doubles as SWO_EN_N which switches the
|
|
|
|
# second FTDI channel UART RxD to the SWO pin instead of the separate RxD
|
|
|
|
# pin. Note that the default init state has this pin high so when OpenOCD
|
|
|
|
# starts in SWD mode, SWO is by default disabled. To enable SWO tracing,
|
2021-06-23 13:54:49 -05:00
|
|
|
# issue the command 'ftdi set_signal SWO_EN 1' where tracing is configured.
|
2019-06-28 08:45:23 -05:00
|
|
|
# To switch back to using the separate UART, SWO_EN needs to be disabled
|
|
|
|
# before exiting OpenOCD, or the adapter replugged.
|
2021-06-23 13:54:49 -05:00
|
|
|
ftdi layout_signal SWO_EN -nalias JTAG_EN
|