Hi all,
I am having trouble to get the initial scan_chain to work without throwing errors (initialization of OpenOCD; workaround i found would be to set -expectedID in the TAP declaration to 0x00000000) because the first TAP device is in the wrong IR state (BYPASS) after a reset.
Before I explain my problem in more detail this is my environment:
Debian Wheezy v7.1
Git - LibUSB - commit fd7a8321
Git - LibFTDI - commit d9673152
Git - OpenOCD - commit 44070100
Compilation was successful after a few tweaks regarding where to find the libraries, symlinks and a bug in libftdi → no prob on this site
My Board / Chip:
It is an evaluation board for a Custom made SoC with a Boundary Scan TAP and a CPU TAP (Cortex M3) which are chained as followed (after reset):
OLIMEX ARM-USB-TINY-H TDO ----> JTAG TDI ----> Boundary Scan TAP (BS) in BYPASS (= problem with scan_chain) ----> Cortex M3 TAP in IDCODE ----> TDO
Used configuration:
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x002a
reset_config trst_and_srst
adapter_nsrst_assert_width 100
adapter_nsrst_delay 300
jtag_ntrst_assert_width 100
jtag_ntrst_delay 300
adapter_khz 500
jtag newtap chip cpu -expected-id 0x4ba00477 -irlen 4 # is correctly identified
jtag newtap chip bs -expected-id 0x00000000 -irlen 3 # is false-positively correctly identified
#jtag newtap chip bs -expected-id 0xbaaaaaaf -irlen 3 # not working unfortunately
target create chip.cpu cortex_m -chain-position chip.cpu
To my knowledge:
When openocd is started the adapter is configured, tap devices are declared and a target gets created. While creating the target the chain values are compared with the expected target but the BS TAP always returns 0x00000000 (0xbaaaaaaf would be correct).
What I already tried:
- Setting the BS TAP IR status to IDCODE via command “irscan chip.bs 0x1” in the post-reset event but then the detection of the cpu fails with “ERROR: JTAG Scan chain interrogation failed: all ones”:
jtag configure chip.bs -event post-reset {
# irscan chip.cpu 0xf
irscan chip.bs 0x1
}
- After initialization reading the ID via telnet works fine for BS → no problem with hardware:
irscan chip.bs 0x1
drscan chip.bs 32 0
> 0xbaaaaaaf
My questions:
-
Direct manipulation of TMS signaling via TCL script possible ? (Didn’t find anything but maybe I searched wrong)
-
IRSCAN command in event handler “post-reset” is forbidden i assume (at least that is what the manual said) → alternatives ?
-
What other options do I have apart from hacking the OpenOCD C-Code or living with the workaround (I hate workarounds because they always only postpone problems but not solve them).
Please advice because this drives me crazy :think: !
Best Regards
Johannes