Hello,
I’m using openocd with Olimex arm-usb-ocd for a custom str912 board. I have a problem with str9xpec enable_turbo command.
It will give the error: “STR9FLASH (tap2) invalid chain?”
Flashing the device works fine (with str9x driver) but I need to change the boot bank with str9xpec driver.
~/code/olimex/openocd$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> reset halt
RCLK not supported - fallback to 16 kHz
JTAG tap: str912.flash tap/device found: 0x04570041 (mfg: 0x020, part: 0x4570, ver: 0x0)
JTAG tap: str912.cpu tap/device found: 0x25966041 (mfg: 0x020, part: 0x5966, ver: 0x2)
JTAG tap: str912.bs tap/device found: 0x2457f041 (mfg: 0x020, part: 0x457f, ver: 0x2)
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0x00000000
> jtag_reset 0 1
> poll off
> str9xpec enable_turbo 0
**STR9FLASH** (tap2) invalid chain?
>
I’m using the following config script:
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
# jtag speed. We need to stick to 16kHz until we've finished reset.
jtag_rclk 16
jtag_nsrst_delay 100
jtag_ntrst_delay 100
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst
# _CHIPNAME str912
# _ENDIAN little
# _FLASHTAPID 0x04570041
# _CPUTAPID 0x25966041
# _BSTAPID 0x1457f041
# _TARGETNAME str912.cpu
jtag newtap str912 flash -irlen 8 -ircapture 0x1 -irmask 0x1 -expected-id 0x04570041
jtag newtap str912 cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x25966041
jtag newtap str912 bs -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id 0x2457f041
target create str912.cpu arm966e -endian little -chain-position str912.cpu -variant arm966e
str912.cpu configure -event reset-start {
jtag_rclk 16
}
str912.cpu configure -event reset-init {
# We can increase speed now that we know the target is halted.
jtag_rclk 16
# -- Enable 96K RAM
# PFQBC enabled / DTCM & AHB wait-states disabled
mww 0x5C002034 0x0191
}
str912.cpu configure -work-area-virt 0 -work-area-phys 0x50000000 -work-area-size 16384 -work-area-backup 0
#flash bank str9x <base> <size> 0 0 <target#> <variant>
flash bank str912.flash0 str9xpec 0x00020000 0x00200000 0 0 str912.cpu
flash bank str912.flash1 str9xpec 0x00000000 0x00020000 0 0 str912.cpu
Thanks in advance!