openOCD stops responding on "str9xpec lock 0" comm

Same issue on “str9xpec unlock 0”.

This is annoying because I cant execute none further commands or shutdown the openOCD.

Has someone a idea?

Is there a command execute timeout option, have no more idea…

my openOCD config:

#daemon configuration
telnet_port 4444
gdb_port 3333

# tell gdb our flash memory map
# and enable flash programming
gdb_memory_map enable
gdb_flash_program enable

#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 1

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

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 8 0x1 0x1 0xfe
jtag_device 4 0x1 0xf 0xe
jtag_device 5 0x1 0x1 0x1e

#target configuration
daemon_startup reset

#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm966e little run_and_init 1 arm966e

run_and_halt_time 0 30

target_script 0 reset confLOCK.script

working_area 0 0x50000000 16384 nobackup

#flash bank str7x <base> <size> 0 0 <target#> <variant>
flash bank str9xpec 0x00000000 0x00080000 0 0 0

# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger

my confLOCK.script:

jtag_reset 0 1
str9xpec enable_turbo 0
str9xpec lock 0
str9xpec disable_turbo 0
jtag_reset 0 0
shutdown

has the device already been locked?

could you provide a openocd log of the output?

Cheers

Spen

The str912 is fully erased, then i try to “lock”.

Good news. I found out what was the problem.

OpenOCD stops responding if executed “enable_turbo” in my script.

My new confLOCK.script:

str9xpec lock 0
shutdown

The first debug log is whit my old script and the second with my newone.

Open On-Chip Debugger (2008-06-19 19:00) svn: 717

Debug:   7 15 command.c:432 command_run_line(): script openocd_confLOCK.cfg
Debug:   8 15 configuration.c:87 open_file_from_path(): opened openocd_confLOCK.cfg
Debug:   10 15 command.c:432 command_run_line(): telnet_port 4444
Debug:   12 15 command.c:432 command_run_line(): gdb_port 3333
Debug:   14 15 command.c:432 command_run_line(): gdb_memory_map enable
Debug:   16 15 command.c:432 command_run_line(): gdb_flash_program enable
Debug:   18 15 command.c:432 command_run_line(): interface ft2232
Debug:   20 15 command.c:432 command_run_line(): ft2232_device_desc "Olimex OpenOCD JTAG A"
Debug:   22 15 command.c:432 command_run_line(): ft2232_layout "olimex-jtag"
Debug:   24 15 command.c:432 command_run_line(): ft2232_vid_pid 0x15BA 0x0003
Debug:   26 15 command.c:432 command_run_line(): jtag_speed 1
Debug:   27 15 jtag.c:1863 handle_jtag_speed_command(): handle jtag speed
Info:    28 15 options.c:50 configuration_output_handler(): jtag_speed: 1, 1
Debug:   30 15 command.c:432 command_run_line(): jtag_nsrst_delay 100
Debug:   32 15 command.c:432 command_run_line(): jtag_ntrst_delay 100
Debug:   34 15 command.c:432 command_run_line(): reset_config trst_and_srst
Debug:   36 15 command.c:432 command_run_line(): jtag_device 8 0x1 0x1 0xfe
Debug:   38 15 command.c:432 command_run_line(): jtag_device 4 0x1 0xf 0xe
Debug:   40 15 command.c:432 command_run_line(): jtag_device 5 0x1 0x1 0x1e
Debug:   42 15 command.c:432 command_run_line(): daemon_startup reset
Info:    43 15 options.c:50 configuration_output_handler(): Open On-Chip Debugger (2008-06-19 19:00) svn: 717
Debug:   45 15 command.c:432 command_run_line(): target arm966e little run_and_init 1 arm966e
Debug:   46 15 arm966e.c:142 arm966e_target_command(): chain_pos: 1, variant: arm966e
Debug:   48 15 command.c:432 command_run_line(): run_and_halt_time 0 30
Debug:   50 15 command.c:432 command_run_line(): target_script 0 reset confLOCK.script
Debug:   52 15 command.c:432 command_run_line(): working_area 0 0x50000000 16384 nobackup
Debug:   54 15 command.c:432 command_run_line(): flash bank str9xpec 0x00000000 0x00080000 0 0 0
Debug:   56 15 command.c:432 command_run_line(): init
Debug:   57 31 openocd.c:102 handle_init_command(): target init complete
Debug:   58 31 ft2232.c:1374 ft2232_init_ftd2xx(): 'ft2232' interface using FTD2XX with 'olimex-jtag' layout (15ba:0003)
Debug:   59 47 ft2232.c:1463 ft2232_init_ftd2xx(): current latency timer: 2
Debug:   60 47 ft2232.c:1810 olimex_jtag_init(): 80 08 1b
Debug:   61 47 ft2232.c:1853 olimex_jtag_init(): 82 09 0f
Debug:   62 47 ft2232.c:253 ft2232_speed(): 86 01 00
Debug:   63 62 openocd.c:109 handle_init_command(): jtag interface init complete
Debug:   64 62 jtag.c:1537 jtag_init_inner(): Init JTAG chain
Debug:   65 62 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   66 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   67 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   68 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   69 62 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   70 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   71 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   72 62 jtag.c:1295 jtag_reset_callback(): -
Info:    73 78 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufacturer: 0x020, Part: 0x4570, Version: 0x0)
Info:    74 78 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufacturer: 0x020, Part: 0x5966, Version: 0x2)
Info:    75 78 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufacturer: 0x020, Part: 0x457f, Version: 0x2)
Debug:   76 78 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   77 78 jtag.c:1295 jtag_reset_callback(): -
Debug:   78 78 jtag.c:1295 jtag_reset_callback(): -
Debug:   79 78 jtag.c:1295 jtag_reset_callback(): -
Debug:   80 78 openocd.c:116 handle_init_command(): jtag init complete
Debug:   81 78 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000000
Debug:   82 78 openocd.c:119 handle_init_command(): jtag examine complete
Debug:   83 78 openocd.c:126 handle_init_command(): flash init complete
Debug:   84 78 openocd.c:130 handle_init_command(): NAND init complete
Debug:   85 78 openocd.c:134 handle_init_command(): pld init complete
Debug:   86 93 gdb_server.c:2036 gdb_init(): gdb service for target arm966e at port 3333
Debug:   88 93 command.c:432 command_run_line(): reset
Debug:   89 93 target.c:1851 handle_reset_command(): -
Debug:   90 93 ft2232.c:253 ft2232_speed(): 86 01 00
Debug:   91 93 jtag.c:1581 jtag_init_reset(): Trying to bring the JTAG controller to life by asserting TRST / TLR
Debug:   92 93 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   93 93 jtag.c:1015 jtag_add_reset(): TRST line asserted
Debug:   94 93 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   95 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   96 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   97 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   98 93 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   99 93 jtag.c:1015 jtag_add_reset(): TRST line asserted
Debug:   100 93 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   101 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   102 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   103 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   104 93 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   105 93 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   106 93 ft2232.c:1037 olimex_jtag_reset(): trst: 1, srst: 0, high_output: 0x08, high_direction: 0x0f
Debug:   107 203 ft2232.c:1037 olimex_jtag_reset(): trst: 1, srst: 1, high_output: 0x0a, high_direction: 0x0f
Debug:   108 203 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x0b, high_direction: 0x0f
Debug:   109 312 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x09, high_direction: 0x0f
Debug:   110 531 jtag.c:1537 jtag_init_inner(): Init JTAG chain
Debug:   111 531 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   112 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   113 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   114 531 jtag.c:1295 jtag_reset_callback(): -
Info:    115 531 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufacturer: 0x020, Part: 0x4570, Version: 0x0)
Info:    116 531 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufacturer: 0x020, Part: 0x5966, Version: 0x2)
Info:    117 531 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufacturer: 0x020, Part: 0x457f, Version: 0x2)
Debug:   118 531 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   119 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   120 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   121 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   122 531 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000000
Debug:   123 531 arm7_9_common.c:767 arm7_9_assert_reset(): target->state: unknown
Debug:   124 531 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   125 531 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x03, high_direction: 0x0f
Debug:   126 703 arm7_9_common.c:820 arm7_9_deassert_reset(): target->state: reset
Debug:   127 703 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   128 703 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x01, high_direction: 0x0f
Debug:   129 922 target.c:411 target_process_reset(): Waiting for halted stated as approperiate
Debug:   130 922 arm7_9_common.c:960 arm7_9_halt(): target->state: running
Debug:   131 922 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000002
Debug:   132 922 target.c:425 target_process_reset(): Polling target
Debug:   133 922 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005
Debug:   134 922 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005
Debug:   135 922 arm7_9_common.c:1074 arm7_9_debug_entry(): target entered debug from ARM state
Debug:   136 922 arm7_9_common.c:1106 arm7_9_debug_entry(): target entered debug state in Undefined mode
Debug:   137 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r0: 0x000000db
Debug:   138 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r1: 0x00000000
Debug:   139 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r2: 0x00000000
Debug:   140 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r3: 0x00000000
Debug:   141 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r4: 0x00000000
Debug:   142 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r5: 0x00000000
Debug:   143 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r6: 0x00000000
Debug:   144 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r7: 0x00000000
Debug:   145 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r8: 0x00000000
Debug:   146 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r9: 0x00000000
Debug:   147 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r10: 0x00000000
Debug:   148 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r11: 0x00000000
Debug:   149 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r12: 0x00000083
Debug:   150 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r13: 0x008a0000
Debug:   151 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r14: 0x00000008
Debug:   152 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r15: 0x00000004
Debug:   153 922 arm7_9_common.c:1143 arm7_9_debug_entry(): entered debug state at PC 0x4
Debug:   154 922 target.c:724 target_call_event_callbacks(): target event 0
Debug:   155 922 configuration.c:87 open_file_from_path(): opened confLOCK.script
Info:    156 922 target.c:237 target_init_handler(): executing reset script 'confLOCK.script'
Debug:   158 922 command.c:432 command_run_line(): jtag_reset 0 1
Debug:   159 922 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   160 922 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x0b, high_direction: 0x0f
Debug:   162 1031 command.c:432 command_run_line(): str9xpec enable_turbo 0
Debug:   164 1031 command.c:432 command_run_line(): str9xpec lock 0
Debug:   165 1031 str9xpec.c:165 str9xpec_isc_status(): status: 0x2e
Debug:   166 1031 str9xpec.c:194 str9xpec_isc_enable(): ISC_MODE Enabled
Debug:   7 0 command.c:432 command_run_line(): script openocd_confLOCK.cfg
Debug:   8 0 configuration.c:87 open_file_from_path(): opened openocd_confLOCK.cfg
Debug:   10 0 command.c:432 command_run_line(): telnet_port 4444
Debug:   12 0 command.c:432 command_run_line(): gdb_port 3333
Debug:   14 0 command.c:432 command_run_line(): gdb_memory_map enable
Debug:   16 0 command.c:432 command_run_line(): gdb_flash_program enable
Debug:   18 0 command.c:432 command_run_line(): interface ft2232
Debug:   20 0 command.c:432 command_run_line(): ft2232_device_desc "Olimex OpenOCD JTAG A"
Debug:   22 0 command.c:432 command_run_line(): ft2232_layout "olimex-jtag"
Debug:   24 0 command.c:432 command_run_line(): ft2232_vid_pid 0x15BA 0x0003
Debug:   26 0 command.c:432 command_run_line(): jtag_speed 1
Debug:   27 0 jtag.c:1863 handle_jtag_speed_command(): handle jtag speed
Info:    28 0 options.c:50 configuration_output_handler(): jtag_speed: 1, 1
Debug:   30 0 command.c:432 command_run_line(): jtag_nsrst_delay 100
Debug:   32 0 command.c:432 command_run_line(): jtag_ntrst_delay 100
Debug:   34 0 command.c:432 command_run_line(): reset_config trst_and_srst
Debug:   36 0 command.c:432 command_run_line(): jtag_device 8 0x1 0x1 0xfe
Debug:   38 0 command.c:432 command_run_line(): jtag_device 4 0x1 0xf 0xe
Debug:   40 0 command.c:432 command_run_line(): jtag_device 5 0x1 0x1 0x1e
Debug:   42 0 command.c:432 command_run_line(): daemon_startup reset
Info:    43 0 options.c:50 configuration_output_handler(): Open On-Chip Debugger (2008-06-19 19:00) svn: 717
Debug:   45 0 command.c:432 command_run_line(): target arm966e little run_and_init 1 arm966e
Debug:   46 0 arm966e.c:142 arm966e_target_command(): chain_pos: 1, variant: arm966e
Debug:   48 0 command.c:432 command_run_line(): run_and_halt_time 0 30
Debug:   50 0 command.c:432 command_run_line(): target_script 0 reset confLOCK.script
Debug:   52 0 command.c:432 command_run_line(): working_area 0 0x50000000 16384 nobackup
Debug:   54 0 command.c:432 command_run_line(): flash bank str9xpec 0x00000000 0x00080000 0 0 0
Debug:   56 0 command.c:432 command_run_line(): init
Debug:   57 0 openocd.c:102 handle_init_command(): target init complete
Debug:   58 0 ft2232.c:1374 ft2232_init_ftd2xx(): 'ft2232' interface using FTD2XX with 'olimex-jtag' layout (15ba:0003)
Debug:   59 31 ft2232.c:1463 ft2232_init_ftd2xx(): current latency timer: 2
Debug:   60 31 ft2232.c:1810 olimex_jtag_init(): 80 08 1b
Debug:   61 31 ft2232.c:1853 olimex_jtag_init(): 82 09 0f
Debug:   62 31 ft2232.c:253 ft2232_speed(): 86 01 00
Debug:   63 47 openocd.c:109 handle_init_command(): jtag interface init complete
Debug:   64 47 jtag.c:1537 jtag_init_inner(): Init JTAG chain
Debug:   65 47 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   66 47 jtag.c:1295 jtag_reset_callback(): -
Debug:   67 47 jtag.c:1295 jtag_reset_callback(): -
Debug:   68 47 jtag.c:1295 jtag_reset_callback(): -
Debug:   69 47 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   70 47 jtag.c:1295 jtag_reset_callback(): -
Debug:   71 47 jtag.c:1295 jtag_reset_callback(): -
Debug:   72 47 jtag.c:1295 jtag_reset_callback(): -
Info:    73 47 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufacturer: 0x020, Part: 0x4570, Version: 0x0)
Info:    74 47 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufacturer: 0x020, Part: 0x5966, Version: 0x2)
Info:    75 47 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufacturer: 0x020, Part: 0x457f, Version: 0x2)
Debug:   76 47 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   77 47 jtag.c:1295 jtag_reset_callback(): -
Debug:   78 47 jtag.c:1295 jtag_reset_callback(): -
Debug:   79 47 jtag.c:1295 jtag_reset_callback(): -
Debug:   80 47 openocd.c:116 handle_init_command(): jtag init complete
Debug:   81 62 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000000
Debug:   82 62 openocd.c:119 handle_init_command(): jtag examine complete
Debug:   83 78 openocd.c:126 handle_init_command(): flash init complete
Debug:   84 78 openocd.c:130 handle_init_command(): NAND init complete
Debug:   85 78 openocd.c:134 handle_init_command(): pld init complete
Debug:   86 94 gdb_server.c:2036 gdb_init(): gdb service for target arm966e at port 3333
Debug:   88 94 command.c:432 command_run_line(): reset
Debug:   89 94 target.c:1851 handle_reset_command(): -
Debug:   90 94 ft2232.c:253 ft2232_speed(): 86 01 00
Debug:   91 94 jtag.c:1581 jtag_init_reset(): Trying to bring the JTAG controller to life by asserting TRST / TLR
Debug:   92 94 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   93 94 jtag.c:1015 jtag_add_reset(): TRST line asserted
Debug:   94 94 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   95 94 jtag.c:1295 jtag_reset_callback(): -
Debug:   96 94 jtag.c:1295 jtag_reset_callback(): -
Debug:   97 94 jtag.c:1295 jtag_reset_callback(): -
Debug:   98 94 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   99 94 jtag.c:1015 jtag_add_reset(): TRST line asserted
Debug:   100 94 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   101 94 jtag.c:1295 jtag_reset_callback(): -
Debug:   102 94 jtag.c:1295 jtag_reset_callback(): -
Debug:   103 94 jtag.c:1295 jtag_reset_callback(): -
Debug:   104 94 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   105 94 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   106 94 ft2232.c:1037 olimex_jtag_reset(): trst: 1, srst: 0, high_output: 0x08, high_direction: 0x0f
Debug:   107 203 ft2232.c:1037 olimex_jtag_reset(): trst: 1, srst: 1, high_output: 0x0a, high_direction: 0x0f
Debug:   108 203 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x0b, high_direction: 0x0f
Debug:   109 312 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x09, high_direction: 0x0f
Debug:   110 531 jtag.c:1537 jtag_init_inner(): Init JTAG chain
Debug:   111 531 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   112 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   113 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   114 531 jtag.c:1295 jtag_reset_callback(): -
Info:    115 531 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufacturer: 0x020, Part: 0x4570, Version: 0x0)
Info:    116 531 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufacturer: 0x020, Part: 0x5966, Version: 0x2)
Info:    117 531 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufacturer: 0x020, Part: 0x457f, Version: 0x2)
Debug:   118 531 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   119 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   120 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   121 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   122 531 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000000
Debug:   123 531 arm7_9_common.c:767 arm7_9_assert_reset(): target->state: unknown
Debug:   124 531 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   125 531 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x03, high_direction: 0x0f
Debug:   126 703 arm7_9_common.c:820 arm7_9_deassert_reset(): target->state: reset
Debug:   127 703 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   128 703 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x01, high_direction: 0x0f
Debug:   129 922 target.c:411 target_process_reset(): Waiting for halted stated as approperiate
Debug:   130 922 arm7_9_common.c:960 arm7_9_halt(): target->state: running
Debug:   131 922 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000002
Debug:   132 922 target.c:425 target_process_reset(): Polling target
Debug:   133 922 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005
Debug:   134 922 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005
Debug:   135 922 arm7_9_common.c:1074 arm7_9_debug_entry(): target entered debug from ARM state
Debug:   136 922 arm7_9_common.c:1106 arm7_9_debug_entry(): target entered debug state in Undefined mode
Debug:   137 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r0: 0xd296d769
Debug:   138 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r1: 0x35fe8210
Debug:   139 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r2: 0x954844b2
Debug:   140 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r3: 0xf8600f58
Debug:   141 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r4: 0x8c61087c
Debug:   142 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r5: 0x42f52888
Debug:   143 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r6: 0x51ed539a
Debug:   144 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r7: 0x22f0748a
Debug:   145 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r8: 0x17fb1e85
Debug:   146 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r9: 0x42a99f75
Debug:   147 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r10: 0x17a69c2d
Debug:   148 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r11: 0xa87bcc9f
Debug:   149 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r12: 0x1a650883
Debug:   150 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r13: 0xec8a4372
Debug:   151 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r14: 0x00000008
Debug:   152 922 arm7_9_common.c:1137 arm7_9_debug_entry(): r15: 0x00000004
Debug:   153 922 arm7_9_common.c:1143 arm7_9_debug_entry(): entered debug state at PC 0x4
Debug:   154 922 target.c:724 target_call_event_callbacks(): target event 0
Debug:   155 922 configuration.c:87 open_file_from_path(): opened confLOCK.script
Info:    156 922 target.c:237 target_init_handler(): executing reset script 'confLOCK.script'
Debug:   158 922 command.c:432 command_run_line(): str9xpec lock 0
Debug:   159 922 str9xpec.c:165 str9xpec_isc_status(): status: 0x2e
Debug:   160 922 str9xpec.c:194 str9xpec_isc_enable(): ISC_MODE Enabled
Debug:   161 937 str9xpec.c:165 str9xpec_isc_status(): status: 0x26
Debug:   162 937 str9xpec.c:223 str9xpec_isc_disable(): ISC_MODE Disabled
Debug:   163 937 command.c:387 find_and_run_command(): Command failed with error code -902
Debug:   165 937 command.c:432 command_run_line(): shutdown
Debug:   166 937 ft2232.c:253 ft2232_speed(): 86 01 00

With “unlock” still no luck. Have tried all combination’s.

It looks like the script wont execute, if I telnet then can unlock.

my confUNLOCK.script:

jtag_reset 0 1
str9xpec enable_turbo 0
str9xpec unlock 0
str9xpec disable_turbo 0
jtag_reset 0 0
shutdown

Open On-Chip Debugger (2008-06-19 19:00) svn: 717

Debug:   7 0 command.c:432 command_run_line(): script openocd_confUNLOCK.cfg
Debug:   8 15 configuration.c:87 open_file_from_path(): opened openocd_confUNLOCK.cfg
Debug:   10 15 command.c:432 command_run_line(): telnet_port 4444
Debug:   12 15 command.c:432 command_run_line(): gdb_port 3333
Debug:   14 15 command.c:432 command_run_line(): gdb_memory_map enable
Debug:   16 15 command.c:432 command_run_line(): gdb_flash_program enable
Debug:   18 15 command.c:432 command_run_line(): interface ft2232
Debug:   20 15 command.c:432 command_run_line(): ft2232_device_desc "Olimex OpenOCD JTAG A"
Debug:   22 15 command.c:432 command_run_line(): ft2232_layout "olimex-jtag"
Debug:   24 15 command.c:432 command_run_line(): ft2232_vid_pid 0x15BA 0x0003
Debug:   26 15 command.c:432 command_run_line(): jtag_speed 1
Debug:   27 15 jtag.c:1863 handle_jtag_speed_command(): handle jtag speed
Info:    28 15 options.c:50 configuration_output_handler(): jtag_speed: 1, 1
Debug:   30 15 command.c:432 command_run_line(): jtag_nsrst_delay 100
Debug:   32 15 command.c:432 command_run_line(): jtag_ntrst_delay 100
Debug:   34 15 command.c:432 command_run_line(): reset_config trst_and_srst
Debug:   36 15 command.c:432 command_run_line(): jtag_device 8 0x1 0x1 0xfe
Debug:   38 15 command.c:432 command_run_line(): jtag_device 4 0x1 0xf 0xe
Debug:   40 15 command.c:432 command_run_line(): jtag_device 5 0x1 0x1 0x1e
Debug:   42 15 command.c:432 command_run_line(): daemon_startup reset
Info:    43 15 options.c:50 configuration_output_handler(): Open On-Chip Debugger (2008-06-19 19:00) svn: 717
Debug:   45 15 command.c:432 command_run_line(): target arm966e little run_and_init 1 arm966e
Debug:   46 15 arm966e.c:142 arm966e_target_command(): chain_pos: 1, variant: arm966e
Debug:   48 15 command.c:432 command_run_line(): run_and_halt_time 0 30
Debug:   50 15 command.c:432 command_run_line(): target_script 0 reset confUNLOCK.script
Debug:   52 15 command.c:432 command_run_line(): working_area 0 0x50000000 16384 nobackup
Debug:   54 15 command.c:432 command_run_line(): flash bank str9xpec 0x00000000 0x00080000 0 0 0
Debug:   56 15 command.c:432 command_run_line(): init
Debug:   57 15 openocd.c:102 handle_init_command(): target init complete
Debug:   58 15 ft2232.c:1374 ft2232_init_ftd2xx(): 'ft2232' interface using FTD2XX with 'olimex-jtag' layout (15ba:0003)
Debug:   59 46 ft2232.c:1463 ft2232_init_ftd2xx(): current latency timer: 2
Debug:   60 46 ft2232.c:1810 olimex_jtag_init(): 80 08 1b
Debug:   61 46 ft2232.c:1853 olimex_jtag_init(): 82 09 0f
Debug:   62 46 ft2232.c:253 ft2232_speed(): 86 01 00
Debug:   63 62 openocd.c:109 handle_init_command(): jtag interface init complete
Debug:   64 62 jtag.c:1537 jtag_init_inner(): Init JTAG chain
Debug:   65 62 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   66 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   67 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   68 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   69 62 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   70 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   71 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   72 62 jtag.c:1295 jtag_reset_callback(): -
Info:    73 62 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufacturer: 0x020, Part: 0x4570, Version: 0x0)
Info:    74 62 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufacturer: 0x020, Part: 0x5966, Version: 0x2)
Info:    75 62 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufacturer: 0x020, Part: 0x457f, Version: 0x2)
Debug:   76 62 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   77 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   78 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   79 62 jtag.c:1295 jtag_reset_callback(): -
Debug:   80 62 openocd.c:116 handle_init_command(): jtag init complete
Debug:   81 62 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000000
Debug:   82 78 openocd.c:119 handle_init_command(): jtag examine complete
Debug:   83 78 openocd.c:126 handle_init_command(): flash init complete
Debug:   84 78 openocd.c:130 handle_init_command(): NAND init complete
Debug:   85 78 openocd.c:134 handle_init_command(): pld init complete
Debug:   86 78 gdb_server.c:2036 gdb_init(): gdb service for target arm966e at port 3333
Debug:   88 78 command.c:432 command_run_line(): reset
Debug:   89 78 target.c:1851 handle_reset_command(): -
Debug:   90 78 ft2232.c:253 ft2232_speed(): 86 01 00
Debug:   91 93 jtag.c:1581 jtag_init_reset(): Trying to bring the JTAG controller to life by asserting TRST / TLR
Debug:   92 93 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   93 93 jtag.c:1015 jtag_add_reset(): TRST line asserted
Debug:   94 93 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   95 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   96 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   97 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   98 93 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   99 93 jtag.c:1015 jtag_add_reset(): TRST line asserted
Debug:   100 93 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   101 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   102 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   103 93 jtag.c:1295 jtag_reset_callback(): -
Debug:   104 93 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   105 93 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   106 93 ft2232.c:1037 olimex_jtag_reset(): trst: 1, srst: 0, high_output: 0x08, high_direction: 0x0f
Debug:   107 203 ft2232.c:1037 olimex_jtag_reset(): trst: 1, srst: 1, high_output: 0x0a, high_direction: 0x0f
Debug:   108 203 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x0b, high_direction: 0x0f
Debug:   109 312 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x09, high_direction: 0x0f
Debug:   110 531 jtag.c:1537 jtag_init_inner(): Init JTAG chain
Debug:   111 531 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   112 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   113 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   114 531 jtag.c:1295 jtag_reset_callback(): -
Info:    115 531 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufacturer: 0x020, Part: 0x4570, Version: 0x0)
Info:    116 531 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufacturer: 0x020, Part: 0x5966, Version: 0x2)
Info:    117 531 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufacturer: 0x020, Part: 0x457f, Version: 0x2)
Debug:   118 531 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   119 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   120 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   121 531 jtag.c:1295 jtag_reset_callback(): -
Debug:   122 531 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000000
Debug:   123 531 arm7_9_common.c:767 arm7_9_assert_reset(): target->state: unknown
Debug:   124 531 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   125 531 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x03, high_direction: 0x0f
Debug:   126 703 arm7_9_common.c:820 arm7_9_deassert_reset(): target->state: reset
Debug:   127 703 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   128 703 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x01, high_direction: 0x0f
Debug:   129 921 target.c:411 target_process_reset(): Waiting for halted stated as approperiate
Debug:   130 921 arm7_9_common.c:960 arm7_9_halt(): target->state: running
Debug:   131 921 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000002
Debug:   132 921 target.c:425 target_process_reset(): Polling target
Debug:   134 1421 target.c:425 target_process_reset(): Polling target
Debug:   136 1921 target.c:425 target_process_reset(): Polling target
Debug:   138 2421 target.c:425 target_process_reset(): Polling target
Debug:   140 2921 target.c:425 target_process_reset(): Polling target
Debug:   142 3421 target.c:425 target_process_reset(): Polling target
Debug:   144 3921 target.c:425 target_process_reset(): Polling target
Debug:   146 4421 target.c:425 target_process_reset(): Polling target
Debug:   148 4921 target.c:425 target_process_reset(): Polling target
Debug:   150 5421 target.c:425 target_process_reset(): Polling target
Debug:   152 5921 target.c:425 target_process_reset(): Polling target
Debug:   154 6421 target.c:425 target_process_reset(): Polling target
User:    155 6421 target.c:436 target_process_reset(): Timed out waiting for halt after reset
Debug:   156 6421 ft2232.c:253 ft2232_speed(): 86 01 00
Info:    157 6421 server.c:78 add_connection(): accepting 'telnet' connection from 0
Debug:   159 16468 command.c:432 command_run_line(): str9xpec unlock 0
Debug:   160 16468 str9xpec.c:165 str9xpec_isc_status(): status: 0x6e
Info:    161 16468 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   162 16468 str9xpec.c:194 str9xpec_isc_enable(): ISC_MODE Enabled
Debug:   163 16468 str9xpec.c:487 str9xpec_erase_area(): erase: first_bank: 0, last_bank: 255
Debug:   164 16468 str9xpec.c:508 str9xpec_erase_area(): ISC_ERASE
Debug:   165 16468 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    166 16468 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   167 16484 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    168 16484 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   169 16499 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    170 16499 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   171 16515 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    172 16515 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1043 23327 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1044 23327 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1045 23343 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1046 23343 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1047 23358 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1048 23358 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1049 23374 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1050 23374 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1051 23390 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1052 23390 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1053 23405 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1054 23405 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1055 23421 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1056 23421 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1413 26218 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1414 26218 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1415 26233 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1416 26233 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1417 26249 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1418 26249 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1419 26265 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1420 26265 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1421 26280 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1422 26280 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1423 26296 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1424 26296 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1425 26311 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1426 26311 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1427 26327 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1428 26327 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1429 26343 str9xpec.c:165 str9xpec_isc_status(): status: 0x6a
Info:    1430 26343 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1431 26358 str9xpec.c:165 str9xpec_isc_status(): status: 0x6e
Info:    1432 26358 str9xpec.c:168 str9xpec_isc_status(): Device Security Bit Set
Debug:   1433 26358 str9xpec.c:165 str9xpec_isc_status(): status: 0x26
Debug:   1434 26358 str9xpec.c:223 str9xpec_isc_disable(): ISC_MODE Disabled
Debug:   1435 26374 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005
Debug:   1436 26374 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000005
Debug:   1437 26374 arm7_9_common.c:1074 arm7_9_debug_entry(): target entered debug from ARM state
Debug:   1438 26374 arm7_9_common.c:1106 arm7_9_debug_entry(): target entered debug state in Undefined mode
Debug:   1439 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r0: 0x00000068

Debug:   1440 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r1: 0x00000000
Debug:   1441 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r2: 0x00000000
Debug:   1442 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r3: 0x00000000
Debug:   1443 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r4: 0x00000000
Debug:   1444 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r5: 0x00000000
Debug:   1445 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r6: 0x00000000
Debug:   1446 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r7: 0x00000000
Debug:   1447 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r8: 0x00000000
Debug:   1448 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r9: 0x00000000
Debug:   1449 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r10: 0x00000000
Debug:   1450 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r11: 0x00000000
Debug:   1451 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r12: 0x0000008b
Debug:   1452 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r13: 0x008a0000
Debug:   1453 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r14: 0x00000008
Debug:   1454 26374 arm7_9_common.c:1137 arm7_9_debug_entry(): r15: 0x00000004
Debug:   1455 26374 arm7_9_common.c:1143 arm7_9_debug_entry(): entered debug state at PC 0x4
Debug:   1456 26374 target.c:724 target_call_event_callbacks(): target event 0
User:    1457 26374 target.c:957 target_arch_state(): target state: halted
User:    1458 26374 armv4_5.c:307 armv4_5_arch_state(): target halted in ARM state due to debug request, current mode: Undefined
cpsr: 0x000000db pc: 0x00000004
Debug:   1460 37108 command.c:432 command_run_line(): shutdown
Info:    1461 37108 server.c:395 server_loop(): dropped 'telnet' connection

if the device is locked the reset script will never execute because the target will never halt.

remember that when the target is locked we cannot access the debug cell.

telnet will be the only way of unlocking a locked device.

with newer versions of openocd you can use the reset-start event that will work.

Cheers

Spen

Tnx for the info.

Can you tell from > svn revision?

your version is quite old - svn 717 - latest is 1100.

there are slight changes to the config file but is all mentioned in the docs.

Cheers

Spen