2022-06-12 16:50:59 -05:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2014-08-27 11:17:27 -05:00
|
|
|
#
|
|
|
|
# ADAFRUIT FTDI FT232H as a SWD direct connect interface
|
|
|
|
# Any FT232H based board may work
|
|
|
|
#
|
|
|
|
# http://www.ftdichip.com/Products/ICs/FT232H.htm
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
2019-08-23 08:49:58 -05:00
|
|
|
adapter driver ftdi
|
2014-08-27 11:17:27 -05:00
|
|
|
|
2021-06-23 13:54:49 -05:00
|
|
|
ftdi vid_pid 0x0403 0x6014
|
2014-08-27 11:17:27 -05:00
|
|
|
|
|
|
|
# data MSB..LSB direction (1:out) MSB..LSB
|
|
|
|
# 0000'0000'0011'0000 0000'0000'0011'1011
|
2021-06-23 13:54:49 -05:00
|
|
|
ftdi layout_init 0x0030 0x003b
|
2014-08-27 11:17:27 -05:00
|
|
|
# 0xfff8 0xfffb
|
|
|
|
# Those signal are only required on some platforms or may required to be
|
2020-04-25 18:25:32 -05:00
|
|
|
# enabled explicitly (e.g. nrf5x chips).
|
2021-06-23 13:54:49 -05:00
|
|
|
ftdi layout_signal nSRST -data 0x0010 -oe 0x0010
|
|
|
|
ftdi layout_signal nTRST -data 0x0020 -oe 0x0020
|
2014-08-27 11:17:27 -05:00
|
|
|
|
|
|
|
# swd enable
|
2021-06-23 13:54:49 -05:00
|
|
|
ftdi layout_signal SWD_EN -data 0
|
2014-08-27 11:17:27 -05:00
|
|
|
# tri-state (configure as input) TDO/TIO when reading
|
2021-06-23 13:54:49 -05:00
|
|
|
ftdi layout_signal SWDIO_OE -data 0
|
2014-08-27 11:17:27 -05:00
|
|
|
|
|
|
|
transport select swd
|
|
|
|
|
|
|
|
# re-configure TDO as tri-state
|
2021-06-23 13:54:49 -05:00
|
|
|
#ftdi layout_signal TDO -data 0x0002 -oe 0x0002
|
|
|
|
#ftdi layout_signal TDI -data 0x0004
|
2014-08-27 11:17:27 -05:00
|
|
|
|
|
|
|
# Adafruit FT232H JTAG SWD
|
|
|
|
# Name Pin Name Func Func
|
|
|
|
# D0 J1-3 ADBUS0 TCK SWDCLK
|
|
|
|
# D1 J1-4 ADBUS1 TDO/DI SWDIO
|
|
|
|
# D2 J1-5 ADBUS2 TDI/DO SWDIO
|
|
|
|
# D3 J1-6 ADBUS3 TMS N/A
|
|
|
|
# D4 J1-7 ADBUS4 (GPIOL0) /nSRST optional module reset
|
|
|
|
# D5 J1-8 ADBUS5 (GPIOL1) /nTRST optional target reset
|
|
|
|
# D6 J1-9 ADBUS6 (GPIOL2)
|
|
|
|
# D7 J1-10 ADBUS7 (GPIOL3)
|
|
|
|
# C0 J2-1 ACBUS0 (GPIOH0)
|
|
|
|
# C1 J2-2 ACBUS1 (GPIOH1)
|
|
|
|
# C2 J2-3 ACBUS2 (GPIOH2)
|
|
|
|
# C3 J2-4 ACBUS3 (GPIOH3)
|
|
|
|
# C4 J2-5 ACBUS4 (GPIOH4)
|
|
|
|
# C5 J2-6 ACBUS5 (GPIOH5)
|
|
|
|
# C6 J2-7 ACBUS6 (GPIOH6)
|
|
|
|
# C7 J2-8 ACBUS7 (GPIOH7)
|
|
|
|
# C8 J2-9 ACBUS8
|
|
|
|
# C9 J2-10 ACBUS9
|