Converting to OpenOCD

I am converting from OCDRemote to OpenOCD. I want to be able to update the Flash via JTAG. I have encountered a strange situation.

Lets start with the configuration.

The board is custom. JTAG device is a Olimex Wiggler clone. Board JTAG connector has pull-up and pull-down according to the Olimex demo board schematics.

I just installed OpenOCD yesterday, so I think it is the latest at Rev 88.

The configuration file is:

#daemon configuration

telnet_port 4444

gdb_port 3333

#interface

interface parport

parport_port 0x378

parport_cable wiggler

jtag_speed 0

#use combined on interfaces or targets that can’t set TRST/SRST separately

reset_config trst_and_srst srst_pulls_trst

#jtag scan chain

#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 4 0x1 0xf 0xe

#target configuration

daemon_startup reset

#target

#target arm7tdmi

target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4

target_script 0 reset h2294_init.script

run_and_halt_time 0 30

working_area 0 0x40000000 0x40000 nobackup

#flash configuration

flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum

flash bank cfi 0x80000000 0x400000 2 2 0

After a power cycle of the board, I run

openocd-pp -d3 -f oocd_wig.cfg -l powerup.log

and get

Debug: jtag.c:1184 jtag_init():

Debug: parport.c:373 parport_init(): requesting privileges for parallel port 0x378…

Debug: parport.c:383 parport_init(): …privileges granted

Debug: parport.c:210 parport_reset(): trst: 0, srst: 0

Debug: jtag.c:240 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1070 jtag_reset_callback():

Debug: bitbang.c:223 bitbang_execute_queue(): statemove end in 0

Debug: jtag.c:240 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1070 jtag_reset_callback():

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in 0

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 3f

Debug: jtag.c:988 jtag_read_buffer(): fields[0].in_value: 3f

Error: jtag.c:1123 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 3f

If I run OCDRemote and then kill it and re-run OpenOCD

openocd-pp -d3 -f oocd_wig.cfg -l postocdremote.log

I get:

Debug: jtag.c:1184 jtag_init():

Debug: parport.c:373 parport_init(): requesting privileges for parallel port 0x378…

Debug: parport.c:383 parport_init(): …privileges granted

Debug: parport.c:210 parport_reset(): trst: 0, srst: 0

Debug: jtag.c:240 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1070 jtag_reset_callback():

Debug: bitbang.c:223 bitbang_execute_queue(): statemove end in 0

Debug: jtag.c:240 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1070 jtag_reset_callback():

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in 0

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 3f

Debug: jtag.c:988 jtag_read_buffer(): fields[0].in_value: 31

Debug: openocd.c:98 main(): jtag init complete

Debug: arm7_9_common.c:651 arm7_9_assert_reset(): target->state: unknown

Debug: jtag.c:240 jtag_call_event_callbacks(): jtag event: 0

Debug: jtag.c:1070 jtag_reset_callback():

Debug: jtag.c:240 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1070 jtag_reset_callback():

Warning: arm7_9_common.c:675 arm7_9_assert_reset(): srst resets test logic, too

Debug: jtag.c:240 jtag_call_event_callbacks(): jtag event: 0

Debug: jtag.c:1070 jtag_reset_callback():

Debug: jtag.c:240 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1070 jtag_reset_callback():

Debug: bitbang.c:205 bitbang_execute_queue(): reset trst: 1 srst 1

Debug: parport.c:210 parport_reset(): trst: 1, srst: 1

Debug: bitbang.c:251 bitbang_execute_queue(): sleep

Debug: bitbang.c:205 bitbang_execute_queue(): reset trst: 1 srst 1

Debug: parport.c:210 parport_reset(): trst: 1, srst: 1

Debug: bitbang.c:251 bitbang_execute_queue(): sleep

Debug: arm7_9_common.c:714 arm7_9_deassert_reset(): target->state: reset

Debug: jtag.c:240 jtag_call_event_callbacks(): jtag event: 2

Debug: jtag.c:1070 jtag_reset_callback():

Debug: bitbang.c:205 bitbang_execute_queue(): reset trst: 0 srst 0

Debug: parport.c:210 parport_reset(): trst: 0, srst: 0

Debug: openocd.c:102 main(): target init complete

Debug: openocd.c:106 main(): flash init complete

Debug: gdb_server.c:1115 gdb_init(): gdb service for target arm7tdmi at port 3333

Debug: arm7_9_common.c:777 arm7_9_halt(): target->state: reset

Debug: embeddedice.c:251 embeddedice_write_reg(): 9: 0xffffffff

Debug: jtag.c:240 jtag_call_event_callbacks(): jtag event: 3

Debug: jtag.c:1070 jtag_reset_callback():

Debug: embeddedice.c:251 embeddedice_write_reg(): 11: 0xffffffff

Debug: embeddedice.c:251 embeddedice_write_reg(): 12: 0x00000100

Debug: embeddedice.c:251 embeddedice_write_reg(): 13: 0x000000f7

Debug: embeddedice.c:155 embeddedice_read_reg_w_check(): 1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 8

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 02

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 02

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 0c

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: ffffffff

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 09

Debug: jtag.c:957 jtag_build_buffer(): fields[2].out_value: 01

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 8

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: ffffffff

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 0b

Debug: jtag.c:957 jtag_build_buffer(): fields[2].out_value: 01

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 8

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00000100

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 0c

Debug: jtag.c:957 jtag_build_buffer(): fields[2].out_value: 01

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 8

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 000000f7

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 0d

Debug: jtag.c:957 jtag_build_buffer(): fields[2].out_value: 01

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 8

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00000000

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 01

Debug: jtag.c:957 jtag_build_buffer(): fields[2].out_value: 00

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00000000

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 04

Debug: jtag.c:957 jtag_build_buffer(): fields[2].out_value: 00

Debug: jtag.c:988 jtag_read_buffer(): fields[0].in_value: ffffffff

Debug: arm7_9_common.c:615 arm7_9_poll(): DBGACK set, dbg_state->value: 0xffffffff

Debug: embeddedice.c:251 embeddedice_write_reg(): 0: 0x00000005

Debug: embeddedice.c:251 embeddedice_write_reg(): 12: 0x00000000

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 8

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00000005

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[2].out_value: 01

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 8

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00000000

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 0c

Debug: jtag.c:957 jtag_build_buffer(): fields[2].out_value: 01

Debug: arm7_9_common.c:907 arm7_9_debug_entry(): target entered debug from Thumb state

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 02

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 01

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 0c

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 00060006

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: fc38fc38

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: fc38fc38

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: 00000000

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 1e621e62

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 00060006

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: fc38fc38

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: fc38fc38

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: 278f8787

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 00040004

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 00e200e2

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: fc38fc38

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: fc38fc38

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: arm7_9_common.c:911 arm7_9_debug_entry(): r0_thumb: 0x00000000, pc_thumb: 0xe1e1f1da

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: ffff0117

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 10010587

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 10010587

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffffffff

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffffffff

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffffffff

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: 00000000

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: 278f8787

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffff8787

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffffffff

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffffffff

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffffffff

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: 278f8787

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: 278f8787

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffffffff

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffffffff

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffffffff

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: ffffffff

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: 013c7c3c

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 0000f087

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 0000f1a7

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 10010587

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:957 jtag_build_buffer(): fields[0].out_value: 00

Debug: jtag.c:957 jtag_build_buffer(): fields[1].out_value: 10010587

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Debug: bitbang.c:198 bitbang_execute_queue(): end_state: 5

Debug: bitbang.c:237 bitbang_execute_queue(): scan end in -1

Debug: jtag.c:988 jtag_read_buffer(): fields[1].in_value: c0000000

Debug: bitbang.c:215 bitbang_execute_queue(): runtest 0 cycles, end in -1

Error: armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered

Debug: arm7_9_common.c:934 arm7_9_debug_entry(): target entered debug state in Jazelle mode

Error: armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered

Error: arm7_9_common.c:939 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure

Error: target.c:1011 handle_target(): couldn’t poll target, exiting

If I run the OpenOCD command line again it usually (not always) works correctly. I can telnet into OpenOCD remote and execute commands. Sometimes it takes 3-4 tried.

I tried different JTAG_SPEED Settings, and they make no difference. After the OCDRemote start & kill, JTAG_SPEED can be 0 and it works fine.

Any clue on how to work through this? So far I have put about 8 hours of research into this problem.

May be , i experienced a similar problem using Olimex Wiggler too … and also with a long connecting cable (about 1mt) .

I solved the problem just adding a 10k resistor from pin 11 of 74lvx244 to gnd (i need to better check, i’m just going to remember).

This because long cables picks the 50hz main supply frequancy …

Now its works at full speed and with a 1m cable.

Enrico

Thanks for keeping this alive.

I also am using a long parallel cable to the Wiggler. Probably about 2m.

I opened up my Olimex Wiggler and noticed that there are 2 '244 chips on the board. One on the silk screen side labeled IC1 and the other on the bottom with not silk screen or label.

Which IC are you connecting the pull down to? I will duplicate and see if it helps my case.

I can try to pulldown the pin 11 of the bottom IC (since i tell TOP as the side where you can see the cable and one transistor).

There is a text “R6” near that pin and it is connected to gnd.

I placed between pin 11 and that pad a 0805 smd resistor.

I’m not sure but a 2 mt long parallel cable could be too much again …

Enrico