00:34
Hawk777 has quit [Quit: Leaving.]
00:53
akaWolf has quit [Ping timeout: 265 seconds]
01:32
tsal has quit [Ping timeout: 265 seconds]
01:39
tsal has joined #openocd
01:53
thinkfat has quit [Ping timeout: 246 seconds]
01:53
thinkfat has joined #openocd
02:07
diddly has quit [Ping timeout: 264 seconds]
04:52
nerozero has joined #openocd
08:37
crabbedhaloablut has quit [Remote host closed the connection]
08:38
crabbedhaloablut has joined #openocd
09:40
kraiskil has joined #openocd
10:16
wingsorc__ has joined #openocd
10:21
kraiskil has quit [Ping timeout: 246 seconds]
10:50
wingsorc__ has quit [Remote host closed the connection]
10:59
wingsorc__ has joined #openocd
14:59
kraiskil has joined #openocd
15:22
kraiskil has quit [Ping timeout: 252 seconds]
16:02
nerozero has quit [Ping timeout: 265 seconds]
16:20
defiant has joined #openocd
16:27
sbach has quit [Read error: Connection reset by peer]
16:45
sbach has joined #openocd
18:02
defiant has quit [Quit: defiant]
18:05
shibboleth has joined #openocd
18:09
matsievskiysv has joined #openocd
18:11
matsievskiysv has quit [Client Quit]
18:11
matsievskiysv has joined #openocd
18:15
matsievskiysv has quit [Client Quit]
18:16
matsievskiysv has joined #openocd
18:36
matsievskiysv has quit [Quit: Client closed]
18:39
matsievskiysv has joined #openocd
18:43
shibboleth has quit [Quit: shibboleth]
18:43
<
matsievskiysv >
Hello!
18:43
<
matsievskiysv >
I'm trying to learn how to use OpenOCD and I have a problem creating a DAP for the stm32f1 using JTAG. I'm able to scan JTAG chain and can see my TAPs using the following code
18:43
<
matsievskiysv >
adapter driver ftdi
18:43
<
matsievskiysv >
ftdi vid_pid 0x0403 0x6010
18:43
<
matsievskiysv >
```
18:43
<
matsievskiysv >
adapter speed 1000
18:43
<
matsievskiysv >
transport select jtag
18:43
<
matsievskiysv >
ftdi channel 0
18:43
<
matsievskiysv >
ftdi layout_init 0x20 0x2d
18:43
<
matsievskiysv >
# nTRST is connected to GPIOL1
18:43
<
matsievskiysv >
ftdi layout_signal nTRST -data 0x20 -input 0x20
18:43
<
matsievskiysv >
jtag newtap cortex cpu -irlen 4 -ircapture 0x1 -irmask 0x03 -expected-id 0x3ba00477
18:43
<
matsievskiysv >
# dap create cortex.dap -adiv5 -chain-position cortex.cpu
18:43
<
matsievskiysv >
jtag newtap stm32f1 bs -irlen 5 -ircapture 0x1 -irmask 0x03 -expected-id 0x16410041
18:43
<
matsievskiysv >
# dap create stm32f1.dap -adiv5 -chain-position stm32f1.bs
18:43
<
matsievskiysv >
init
18:43
<
matsievskiysv >
scan_chain
18:43
<
matsievskiysv >
```
18:44
<
matsievskiysv >
but when I uncomment `dap create` commands in it I get error
18:44
<
matsievskiysv >
```
18:44
<
matsievskiysv >
Error: 80 11 adi_v5_jtag.c:446 jtagdp_overrun_check(): Invalid ACK (4) in DAP response
18:44
<
matsievskiysv >
Debug: 81 11 adi_v5_jtag.c:651 jtagdp_transaction_endcheck(): jtag-dp: CTRL/STAT 0xffffffff
18:44
<
matsievskiysv >
Error: 82 11 adi_v5_jtag.c:662 jtagdp_transaction_endcheck(): JTAG-DP STICKY ERROR
18:44
<
matsievskiysv >
Debug: 83 11 adi_v5_jtag.c:664 jtagdp_transaction_endcheck(): JTAG-DP STICKY OVERRUN
18:44
<
matsievskiysv >
Debug: 84 11 command.c:544 run_command(): Command 'dap init' failed with error code -107
18:44
<
matsievskiysv >
```
18:44
<
matsievskiysv >
The same error I get using supplied script
18:44
<
matsievskiysv >
```
18:44
<
matsievskiysv >
adapter driver ftdi
18:44
<
matsievskiysv >
ftdi vid_pid 0x0403 0x6010
18:44
<
matsievskiysv >
adapter speed 1000
18:44
<
matsievskiysv >
transport select jtag
18:44
<
matsievskiysv >
ftdi channel 0
18:44
<
matsievskiysv >
ftdi layout_init 0x20 0x2d
18:44
<
matsievskiysv >
ftdi layout_signal nTRST -data 0x20 -input 0x20
18:44
<
matsievskiysv >
source [find "board/stm32f103c8_blue_pill.cfg"]
18:44
<
matsievskiysv >
init
18:44
<
matsievskiysv >
scan_chain
18:44
<
matsievskiysv >
```
18:46
<
PaulFertser >
matsievskiysv: please do not ever paste more than 3 lines to a channel, use some pastebin.
18:47
<
PaulFertser >
matsievskiysv: why is that you're using a custom target config and not upstream?
18:47
<
PaulFertser >
matsievskiysv: probably the target is sleeping or remapping JTAG?
18:47
<
matsievskiysv >
I need to create a config for different chip and I've decided to practice on something well supported
18:48
<
PaulFertser >
matsievskiysv: do you have reset line connected?
18:48
<
matsievskiysv >
yes, to GPIOL1
18:48
<
matsievskiysv >
no, there's no srst
18:48
<
matsievskiysv >
only trst
18:49
<
PaulFertser >
matsievskiysv: why can't you connect srst to target's reset?
18:51
<
matsievskiysv >
I think I could but I didn't need it when using SWD
18:51
<
matsievskiysv >
It is a simple stm32f1 board I've programmed with stlink
18:52
<
matsievskiysv >
Now I'm trying to connect to it with ftdi jtag
18:56
<
PaulFertser >
matsievskiysv: probably the firmware changes a pin that's essential for jtag but not for swd.
18:56
<
PaulFertser >
matsievskiysv: connect_assert_srst is good for cases like that.
18:56
<
PaulFertser >
matsievskiysv: alternatively, force UART bootloader with the BOOT0 pin.
18:56
<
PaulFertser >
JTAG is available in UART bootloader mode.
19:01
<
matsievskiysv >
I've connected srst, got the same result
19:02
<
matsievskiysv >
Does `layout_signal` have precedence over `layout_init`?
19:03
<
matsievskiysv >
I add lines `ftdi set_signal nTRST` with 0 and 1 after `init` and openocd still shows TAPs
19:04
<
matsievskiysv >
It shouldn't show them with reset pulled down, right?
19:04
<
PaulFertser >
matsievskiysv: did you enable "reset_config connect_assert_srst" ?
19:05
<
PaulFertser >
matsievskiysv: nTRST is handled automatically if enabled by reset_config.
19:05
<
matsievskiysv >
I've pasted the whole code above
19:06
<
matsievskiysv >
If it's not called by some function, then no
19:06
<
PaulFertser >
You need reset_config connect_assert_srst or you need BOOT0 in UART bootloader position to make sure JTAG is working.
19:08
<
PaulFertser >
I suggest you also pastebin full OpenOCD output with -d3.
19:08
urja has quit [Read error: Connection reset by peer]
19:13
<
PaulFertser >
Can't see the snippet without JS, sorry.
19:15
<
matsievskiysv >
Setting boot mode to internal bootloader didn't help
19:16
<
matsievskiysv >
I think I'll try more stable version of openocd
19:19
<
PaulFertser >
matsievskiysv: I'd disconnect TRST and leave it floating.
19:22
<
PaulFertser >
Have to go now, hope you'll find the missing bit.
19:24
<
matsievskiysv >
I hope so too. Thanks!
19:25
urja has joined #openocd
19:47
crabbedhaloablut has quit [Remote host closed the connection]
19:48
crabbedhaloablut has joined #openocd
20:10
matsievskiysv has quit [Quit: Leaving]
20:12
matsievskiysv has joined #openocd
20:19
matsievskiysv has quit [Read error: Connection reset by peer]
20:19
matsievskiysv has joined #openocd
20:27
matsievskiysv has quit [Ping timeout: 265 seconds]
21:14
crabbedhaloablut has quit [Remote host closed the connection]
21:14
crabbedhaloablut has joined #openocd
23:11
Hawk777 has joined #openocd