LPC2119+Olimex ARM-USB-OCD IR mismatch error

Hello,

i have a problem with open-ocd.

A LPC2103 and a LPC2119 work fine with a Keil uLink2.

When i use the LPC2103 with a Olimex ARM-USB-OCD it works also fine.

With the arm-elf-insight i can flash, set brakepoint … all works fine.

But when i use the LPC2119 with the Olimex i get this error :

Error validating JTAG scan chain, IR mismatch, scan returned 0x00

C:\ARM\JTAGTest>openocd-ftd2xx -f LPC2119Olimexfremd.cfg -d4
Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Debug:   5 0 command.c:432 command_run_line(): script LPC2119Olimexfremd.cfg
Debug:   6 0 configuration.c:87 open_file_from_path(): opened LPC2119Olimexfremd.cfg
Debug:   8 16 command.c:432 command_run_line(): gdb_port 3333
Debug:   10 16 command.c:432 command_run_line(): telnet_port 4444
Debug:   12 16 command.c:432 command_run_line(): interface ft2232
Debug:   14 16 command.c:432 command_run_line(): ft2232_device_desc "Olimex OpenOCD JTAG A"
Debug:   16 16 command.c:432 command_run_line(): ft2232_layout "olimex-jtag"
Debug:   18 16 command.c:432 command_run_line(): ft2232_vid_pid 0x15BA 0x0003
Debug:   20 16 command.c:432 command_run_line(): jtag_speed 4
Debug:   21 16 jtag.c:1863 handle_jtag_speed_command(): handle jtag speed
Info:    22 16 options.c:50 configuration_output_handler(): jtag_speed: 4, 4
Debug:   24 31 command.c:432 command_run_line(): jtag_khz 3000
Debug:   25 31 jtag.c:1886 handle_jtag_khz_command(): handle jtag khz
Info:    26 31 options.c:50 configuration_output_handler(): jtag_khz: 3000, 3000
Debug:   28 31 command.c:432 command_run_line(): jtag_nsrst_delay 200
Debug:   30 31 command.c:432 command_run_line(): jtag_ntrst_delay 200
Debug:   32 31 command.c:432 command_run_line(): reset_config trst_and_srst srst_pulls_trst
Debug:   34 31 command.c:432 command_run_line(): jtag_device 4 0x1 0xf 0xe
Debug:   36 31 command.c:432 command_run_line(): target arm7tdmi little 0
Debug:   38 31 command.c:432 command_run_line(): working_area 0 0x40000000 0x2000 nobackup
Debug:   40 47 command.c:432 command_run_line(): flash bank lpc2000 0x0 0x20000 0 0 0 lpc2000_v1 16000 calc_checksum
Debug:   42 47 command.c:432 command_run_line(): init
Debug:   43 47 openocd.c:102 handle_init_command(): target init complete
Debug:   44 47 ft2232.c:1374 ft2232_init_ftd2xx(): 'ft2232' interface using FTD2XX with 'olimex-jtag' layout (15ba:0003)
Debug:   45 62 ft2232.c:1463 ft2232_init_ftd2xx(): current latency timer: 2
Debug:   46 78 ft2232.c:1810 olimex_jtag_init(): 80 08 1b
Debug:   47 78 ft2232.c:1853 olimex_jtag_init(): 82 09 0f
Debug:   48 78 ft2232.c:253 ft2232_speed(): 86 01 00
Debug:   49 94 openocd.c:109 handle_init_command(): jtag interface init complete
Debug:   50 94 jtag.c:1537 jtag_init_inner(): Init JTAG chain
Debug:   51 94 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   52 94 jtag.c:1295 jtag_reset_callback(): -
Debug:   53 94 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   54 94 jtag.c:1295 jtag_reset_callback(): -
Error:   55 109 jtag.c:1351 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.
Error:   56 109 jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain anyway...
Debug:   57 109 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   58 109 jtag.c:1295 jtag_reset_callback(): -
Error:   59 109 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug:   60 125 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   61 125 jtag.c:1295 jtag_reset_callback(): -
Error:   62 125 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug:   63 141 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   64 141 jtag.c:1295 jtag_reset_callback(): -
Error:   65 141 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug:   66 156 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   67 156 jtag.c:1295 jtag_reset_callback(): -
Error:   68 156 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug:   69 172 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   70 172 jtag.c:1295 jtag_reset_callback(): -
Error:   71 172 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug:   72 187 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   73 187 jtag.c:1295 jtag_reset_callback(): -
Error:   74 187 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Error:   75 187 jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit
Debug:   76 187 jtag.c:1581 jtag_init_reset(): Trying to bring the JTAG controller to life by asserting TRST / TLR
Debug:   77 187 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   78 187 jtag.c:1015 jtag_add_reset(): TRST line asserted
Debug:   79 187 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   80 203 jtag.c:1295 jtag_reset_callback(): -
Debug:   81 203 jtag.c:992 jtag_add_reset(): SRST line asserted
Debug:   82 203 jtag.c:1015 jtag_add_reset(): TRST line asserted
Debug:   83 203 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   84 203 jtag.c:1295 jtag_reset_callback(): -
Debug:   85 203 jtag.c:996 jtag_add_reset(): SRST line released
Debug:   86 203 ft2232.c:1037 olimex_jtag_reset(): trst: 1, srst: 0, high_output: 0x00, high_direction: 0x0f
Debug:   87 406 ft2232.c:1037 olimex_jtag_reset(): trst: 1, srst: 1, high_output: 0x02, high_direction: 0x0f
Debug:   88 406 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x01, high_direction: 0x0f
Debug:   89 812 jtag.c:1537 jtag_init_inner(): Init JTAG chain
Debug:   90 812 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   91 812 jtag.c:1295 jtag_reset_callback(): -
Debug:   92 812 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   93 812 jtag.c:1295 jtag_reset_callback(): -
Error:   94 812 jtag.c:1351 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.
Error:   95 812 jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain anyway...
Debug:   96 812 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   97 828 jtag.c:1295 jtag_reset_callback(): -
Error:   98 828 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug:   99 844 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   100 844 jtag.c:1295 jtag_reset_callback(): -
Error:   101 844 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug:   102 859 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   103 859 jtag.c:1295 jtag_reset_callback(): -
Error:   104 859 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug:   105 875 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   106 875 jtag.c:1295 jtag_reset_callback(): -
Error:   107 875 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug:   108 891 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   109 891 jtag.c:1295 jtag_reset_callback(): -
Error:   110 891 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Debug:   111 906 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)
Debug:   112 906 jtag.c:1295 jtag_reset_callback(): -
Error:   113 906 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00
Error:   114 906 jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit
Debug:   115 906 openocd.c:126 handle_init_command(): flash init complete
Debug:   116 906 openocd.c:130 handle_init_command(): NAND init complete
Debug:   117 906 openocd.c:134 handle_init_command(): pld init complete
Debug:   118 922 gdb_server.c:2036 gdb_init(): gdb service for target arm7tdmi at port 3333

When i start arm-elf-insight nevertheless, it says iam connected but get errors during flashing.

the configuration file i use is this:

gdb_port 3333
telnet_port 4444

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

#JTAG settings
jtag_khz 3000
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 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 arm7tdmi <endianess> <jtag#>
target arm7tdmi little 0

#working_area <target#> <address> <size> <'backup'|'nobackup'>
working_area 0 0x40000000 0x2000 nobackup

#flash configuration
#flash bank lpc2000 0x0 0x20000 0 0 0 lpc2000_v1 19661 calc_checksum
flash bank lpc2000 0x0 0x20000 0 0 0 lpc2000_v1 16000 calc_checksum

The LPC2119 are powered external and work fine with the Keil uLink2 JTAG adapter so i think there is no hardware error.

thank you for reading the post!

Any idea if i got something wrong with the configuration file?

Kind regards,

Raik Strohbach

Hi,

any idea where i can read (RTFM) about IR mismatch related errors?

Can i savley ignore this IR mismatch error and investigate the flashing error message further?