pebble/waftools/openocd_swd_ftdi.cfg

25 lines
769 B
INI
Raw Permalink Normal View History

interface ftdi
ftdi_vid_pid 0x0403 0x6011 0x0403 0x7893 0x0403 0x7894
# output value, direction (1 for output, 0 for input)
ftdi_layout_init 0x1848 0x185b
ftdi_layout_signal SWD_EN -data 0 -oe 0
ftdi_layout_signal SWDIO_OE -data 0 -oe 0
ftdi_layout_signal nSRST -data 0x0040 -oe 0x0040
# Red + Green LED (inverted output: low is on)
# TX LED (GREEN)
ftdi_layout_signal LED -ndata 0x0080 -oe 0x0080
# RX LED (RED)
ftdi_layout_signal LED2 -ndata 0x0020 -oe 0x0020
transport select swd
# Note: This works around issue where reset_config does not actually toggle this line. It would be
# nice to figure out what the actual issue with 'reset_config' is at some point
proc init_reset { mode } {
ftdi_set_signal nSRST 0
sleep 100
ftdi_set_signal nSRST z
}