PXA27x JTAG error while writing DCSR

Hi,

I am getting the following error when I try to connect to a board based on a PXA270 processor. I am using an Olimex ARM-JTAG parallel port adapter on Ubuntu 7.10, with OpenOCD r242.

Info:    openocd.c:93 main(): Open On-Chip Debugger 1.0 (2007-12-19-14:58) svn:242
Info:    openocd.c:94 main(): $URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
Debug:   jtag.c:1409 jtag_init(): -
Debug:   parport.c:354 parport_init(): opening /dev/parport0...
Debug:   parport.c:366 parport_init(): ...open
Debug:   parport.c:236 parport_reset(): trst: 0, srst: 0
Debug:   jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted
Debug:   jtag.c:1197 jtag_reset_callback(): -
Debug:   jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted
Debug:   jtag.c:1197 jtag_reset_callback(): -
Info:    jtag.c:1291 jtag_examine_chain(): JTAG device found: 0x79265013 (Manufacturer: 0x009, Part: 0x9265, Version: 0x7)
Debug:   jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted
Debug:   jtag.c:1197 jtag_reset_callback(): -
Debug:   openocd.c:114 main(): jtag init complete
Debug:   jtag.c:295 jtag_call_event_callbacks(): jtag event: SRST released
Debug:   jtag.c:1197 jtag_reset_callback(): -
Debug:   jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted
Debug:   jtag.c:1197 jtag_reset_callback(): -
Debug:   jtag.c:295 jtag_call_event_callbacks(): jtag event: SRST released
Debug:   jtag.c:1197 jtag_reset_callback(): -
Debug:   parport.c:236 parport_reset(): trst: 1, srst: 0
Debug:   parport.c:236 parport_reset(): trst: 0, srst: 0
Debug:   xscale.c:1550 xscale_assert_reset(): target->state: unknown
Debug:   jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST released
Debug:   jtag.c:1197 jtag_reset_callback(): -
Warning: jtag.c:1132 jtag_read_buffer(): value captured during scan didn't pass the requested check: captured: 0x00 check_value: 0x02 check_mask: 0x07
Error:   xscale.c:769 xscale_write_dcsr(): JTAG error while writing DCSR

My configuration file is as follows:

# daemon configuration
telnet_port 4444
gdb_port 3333
daemon_startup reset

# interface
interface parport
parport_port 0
parport_cable wiggler
jtag_speed 0
jtag_nsrst_delay 200
jtag_ntrst_delay 200

# use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst separate

# jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 7 0x1 0x7f 0x7e

# target configuration
target xscale little reset_halt 0 pxa27x
run_and_halt_time 0 30

# maps to PXA internal RAM.  If you are using a PXA255
# you must initialize SDRAM or leave this option off
working_area 0 0xa4100000 0x10000 nobackup

# flash bank <driver> <base> <size> <chip_width> <bus_width>
flash bank cfi 0x00000000 0x2000000 2 2 0

This is partially based on the PXA270 example script in the OpenOCD info pages.

Also, I noticed the following in xscale_assert_reset():

        /* set Hold reset, Halt mode and Trap Reset */
        buf_set_u32(xscale->reg_cache->reg_list[XSCALE_DCSR].value, 30, 1, 0x1);
        buf_set_u32(xscale->reg_cache->reg_list[XSCALE_DCSR].value, 16, 1, 0x1);
        xscale_write_dcsr(target, 1, 0);

        /* select BYPASS, because having DCSR selected caused problems on the PXA27x */
        xscale_jtag_set_instr(xscale->jtag_info.chain_pos, 0x7f);
        jtag_execute_queue();

however I am not yet familiar enough with the source code to determine exactly what is happening here.

Any help or advice would be appreciated.

Thanks,

Andrew